I just wrote a code as
for((i=1; i<=5; i++))
awk '$1=="$i"' input.txt > output_$i\.txt
I want to take out the lines in the input.txt in which their first columns are 1 or 2 or 3 or 4 or 5, to get 5 output files as
This code doesn't work unfortunately..
Anyone knows how to make it work?
Thanks in advance