Grep Negative Values that Include '$'
by High_Timelady from LinuxQuestions.org on (#5726W)
So I'm trying to use grep to isolate negative monetary values from a file but nothing I've tried has worked. Ex.) -$42,345
I've tried: grep '-$*' grep '-' grep -- '-*' grep -- '\-$*' grep -F '\-$*' but keep getting invalid option returns or just a blank next line. The file is chart-like and all monetary values are in the second column. Any help is appreciated.


I've tried: grep '-$*' grep '-' grep -- '-*' grep -- '\-$*' grep -F '\-$*' but keep getting invalid option returns or just a blank next line. The file is chart-like and all monetary values are in the second column. Any help is appreciated.