yes , it worked for the set of data you gave
linux-kmy7:/home/shiju.joseph/Desktop # grep -w "[0-9]\{5\}-" text11.txt
12345-
23456-
linux-kmy7:/home/shiju.joseph/Desktop #
But dint work with my test file with this contents
12345-123213sdfsdfsdsdfsdfsd
65433-2342342342342342342342
45454-4353453453453453453453
34534-34534534534534534534534
576457-32542352345235235234523
42343241-2314234234234234234
2345234523-4523523523452345234523453
23452345234-52345324532452345235
234523452345-234523523452345234523
2345342523452-35234523534252345234
32452345324532-45324523453452345234
and I wanted
12345-123213sdfsdfsdsdfsdfsd
65433-2342342342342342342342
45454-4353453453453453453453
34534-34534534534534534534534 to appear in the result
Whether the tips are working or not I am really happy to see the helping minds from the community , the real power of community , thanks to everyone who responded.
Thanks
Shiju
Quote:
Originally Posted by
pritish.sas
Sorry bro
Just omit -v option from
only use
grep -w "[0-9]\{5\}-" filename