5

Matching a decimal number?

view full story
linux-howto

http://www.unix.com – Hi everyone! Easy question for everyone. I'm trying to run a command line to find an exact match of a decimal number within a file. The number can be a positive OR negative number. For instance, if I want to find only the number -1 in the file that has: Code: -17.6 -17 -16.3 -16.2 -15.7 -15.3 -15.2 -1 -14.7 -14.3 -11 -10.9 -10.1 -10 -9.1 -8.1 how can I do this? I tried cat myfile.asc | sed -n '/-1/ p' but this doesn't seem to work :-( Thanks!! (HowTos)