Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Assuming your file is named test.csv:
test.csv
cat test.csv | grep -E "48[0-9]{3}" test.csv
grep -E search a string using a regexp 48
48 is the start number you need [0
[0-9] is a number between 0 and 9 and {3} means 3 times
grep -E search a string using a regexp 48 is the start number you need [0-9] is a number between 0 and 9 and {3} means 3 times
grep -E "48[0-9]{3}" test.csv
grep -E search a string using a regexp
48 is the start number you need
Assuming your file is named test.csv test.csv:
Assuming your file is named test.csv :
cat test.csv | grep -E "48[0-9]{3}"