Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format.
Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format.
It might be a bit easier with awk - if by smaller, you mean numerically
awk 'substr($0,1,9) < 399999999' file > new_file
If that's not what you were asking, please provide some input data. Thanks.
Thanks so much....will try that now. I knew there had to be an easier way then reading the file.
---------- Post updated at 12:13 PM ---------- Previous update was at 12:07 PM ----------
Perfect! Perfect! Thanks again!!!!!
sed '/^[4-9][0-9]\{8\}/d' urfile