100 Useful Command-Line Utilities
by Oliver; 201475. read
read is a shell builtin that I like to use in loops. You can read up a file with a while loop using read—e.g., spit out file.txt exactly as is:$ while read x; do echo "$x"; done < file.txtAnother example:
$ echo -e '1\t2\n3\t4\n5\t6' 1 2 3 4 5 6 $ echo -e '1\t2\n3\t4\n5\t6' | while read x y; do echo $x; done 1 3 5