Hello,
I need to search from a text file all those number from the lines which which lie in the range 1 to 120. Say I have a file with number:
1
2
3
900
1200
so on...
I want to only those lines which has numbers in the range from 1 to 120.
Regards.
programmer321
0
Light Poster
Recommended Answers
Jump to Post
awk '$1>=1 && $1<=120' file
Jump to PostOutput all the numbers from the above search into one file
Generate another file containing all the numbers you expect
Use 'diff' to work out what's missing
All 5 Replies
Salem
5,138
Posting Sage
programmer321
0
Light Poster
Salem
5,138
Posting Sage
programmer321
0
Light Poster
radoulov
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.