output | while read line; doeg. adding a timestamp to a tailed file:$line; done;
tail -f filename | while read line; do echo `date` $line; doneThe output of the command is considered the variable "line" which could be called with $line for anything afterwards, e. g. grabbing a particular (3rd) column of output:
cat filename | while read line; do awk '{print $3}' ; done You can pipe that output to anything like sort followed by uniq -c to get a count of the words in that column.