I want to match the lines which has just 4 digits and nothing else.
So
$ cat size | nawk ' $0 ~ /[0-9][0-9][0-9][0-9]/ {print}'
1234
5678
But when I use the repetition clause it doesn't work
cat size | nawk ' $0 ~ /[0-9]{4}/ {print}'
I actually want to filter out the lines with just 9 digits , but in a elegant manner.
Of course, /[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/ will work, but is there any other possible way?? Thanks in advance!!