Is there a way to grep/egrep between two sets of numbers?
grep
egrep
egrep \"SomeText [19999-22000]\" /some/file.txt
It\'s n
You can use the range function , with awk
,
awk
awk '$2=="19999",$2=="22000"' file SomeText 19999 ffuuu SomeText 20001 ffuuu SomeText 21000 ffuuu
regex is not the right tool for math stuff (although sometimes it can do), in your case, try the awk:
awk '$2>=19999 && $2<=22000' file