| Yes, this iterative procedure is often why "useless" cats get put into it. It's a very effective way of processing regular text information. e.g. I need to grab some info from textfile.txt to use as arguments to a function. cat textfile.txt looks like its comma delimited. cat textfile.txt | cut -d, -f 2-5 ah, its the third and fourth column i need cat textfile.txt | cut -d, -f 3-4 | grep '123456' perfect cat textfile.txt | cut -d, -f 3-4 | grep 123456 | tr , ' ' myfunc $(cat textfile.txt | cut -d, -f 3-4 | grep 123456 | tr , ' ') |
> looks like its comma delimited.
Interesting; why wouldn't you use `head`? Who knows how big textfile.txt is?