Problem with grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I have the latest version of grep and it has a "feature" now that I may 
not want.

As part of something I am doing here, I need grep to search a file for
"-10-", minus the quotes. If it exists, it needs to do a command. So, my 
grep line looks like this:

if [ `grep "-Z003-" ${dir}$1.$$ | /usr/bin/wc -l` -gt 0 ]
(then do blah blah blah...)

This used to work, but now it doesn't. It doesn't like the dashes at the 
beginning and end, and it gives me an "ILLEGAL OPTION" error. What 
changed, and how can I get it to work? The dashes absolutely need to be in 
there.

Thanks for any help!

*******************************************************************************
Gilbert Sebenste                                                     ********
(My opinions only!)                                                  ******
Staff Meteorologist, Northern Illinois University                      ****
E-mail: gilbert@xxxxxxx                                               ***
web: http://weather.admin.niu.edu                                      **
Work phone: 815-753-5492                                                *
*******************************************************************************







[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux