An input file which contains a 1, 2, or 3 in column 1 of each line.
Three output files such that ...
output file #1 contains all input lines with a 1 in column 1.
output file #2 contains all input lines with a 2 in column 1.
output file #3 contains all input lines with a 3 in column 1.
This code doesn't
# File Identifiers
for (( i=1; i<=3; i++ ))
grep '^$i ' $InFile > $OutFile
Please correct the bash if you can.
A secondary issue: Even if this code worked, it reads the input file three times. Can it be made more efficient by making only one pass? awk?
Daniel B. Martin