Top White Papers
Bash Tricks II: Repetitive tasks on filesJun 07, 2009, 14:02 (0 Talkback[s])
(Other stories by Edmundo Carmona)
[ Thanks to Edmundo for this link. ]
"Second we have the while read variable; do x; y; z; done. This construct allows us to read from the standard output line by line placing the content of each line in a variable (multiple variables can be used, in that case a single word from the standard input will be placed in each variable). In our case, we used $filename as our variable (be careful not to use $ on the while read).
0 Talkback[s] (click to add your comment)