0
I'm trying to run three separate processed while reading foo.txt
Here is the example:
cat foo.txt | while read line
do
echo line1
echo line2
echo line3
echo ""
done
The expected output is:
line1
line2
line3
line4
line5
line6
line7
line8
and continues like this. This is just an example. I want to execute some other commands…
Please check your formatting. Your post used code formatting all over the place. Also it'd help if you showed some real example rather than something contrived. – slhck – 2014-01-05T08:34:19.053
Please explain what you actually want to do. Do you want to split a file into groups of three lines and run a different command on the 1st 2nd and 3rd line of each group? – terdon – 2014-01-05T11:19:01.137