0

I'm trying to output a range of numbers from a file using one command line. The way the numbers in the file are organized is:

MMM-NNN-ZZZZ.
MMM consists of 3 digit characters representing the numeric range 375-619, inclusive.
NNN consists of 1 to 3 digit characters representing the numeric range 1-328, inclusive.
ZZZZ consists of 4 digit characters representing the numeric range from 2761-5859, inclusive.

I've been stuck with this for over an hour and what I've managed to come up with so far is: egrep '^[3-5][0-9]{1}|6[0-1][0-9]' l10 which gets me the first 3 numbers.

Thank you

Barmar
  • 596,455
  • 48
  • 393
  • 495

0 Answers0