[Solved] Reusing a 'NOT' command

Hi Guys

I'm trying to search for all lines that that do not contain the dash (-) in it.

eg - I have the following list of numbers.I want to see those that donot contain the (-) in it.In this case '20151'

20151-60882
20151-60883
20151-60891
20151
20151-60893

Thanking you in advance.

Using grep:

grep -v - file

You can try the grep command. The -v switch will negate the pattern you are looking for.

Thanks guys.