3 ms·
Wait, what? You mean like this?: cat somefile |while read line do echo $line|cat -|pipe... done Because otherwise I can't see how a pipeline
by e12e 13y ago
Wait, what? You mean like this?:
cat somefile |while read line
do
echo $line|cat -|pipe...
done
Because otherwise I can't see how a pipeline would be started for each line of a datafile ?
- adestefan 13y agoIt's more common to see this issues with something like this: for f in *; do cat $f | ... done Now make that a directory with thousands of files or a script digs down through through the tree.
- e12e 13y agoBut it's not really the "cat" that's the problem here, is it?
- cnvogel 13y agoSure it's possible without running a subprocess, just open the file on some other filedescriptor. exec 5<words.txt while read line <&5 ; do echo "line read: $line" done exec <&5-