Is it possible for me to find numbers in a file by a range using grep?
like
cat data | cut -f1 | grep <info>
Im trying to find information and extract every amount that is less than a number (ie less than 75 or whatever)
Is this possible?
Is it possible for me to find numbers in a file by a range using grep?
like
cat data | cut -f1 | grep <info>
Im trying to find information and extract every amount that is less than a number (ie less than 75 or whatever)
Is this possible?
Hey There,
I don't believe it's possible in grep, but you can do it pretty simply using egrep - with your example:
cat data|cut -f1|egrep '[0-9]|[1-7][0-5]'
I may be wrong about whether egrep counts from 0 up or up to 0, but the concept is the same.
Hope that helps
, Mike
awk '$1 < 75' filename