pmpx
1
I'm tryning to do something like this,
I have this file:
spaces12tabgoodbye
spaces3tabhello
I want to copy to another file the lines that have the number above 10...
I thought using sort -rn but I don't know how to discard the lines that have the number below 10.
Any idea?
Thanks
Try:
awk '$1>10' < inputfile > anotherfile
pmpx
3
That was what I wanted to do. Thanks.
Another question, is it possible to do something like this in a shell script? If not how can I do? I've already tried this, but didn't worked....
for i in 5 10 15 20
do
awk '$1>i' <inputfile >outputfile
done
I've already tried with a for inside the awk, but it still didn't worked.
Thanks in advance
awk '$1>lim' lim=$i < inputfile > anotherfile