Search Results

Search: Posts Made By: jazzaddict
9,694
Posted By Scrutinizer
See man grep on Solaris...
See man grep on Solaris (https://www.unix.com/man-page/OpenSolaris/1/grep/). The xpg4 version has a -q option.

What do you mean map? This puts it in the variable $grep
You could do this:...
4,340
Posted By Scrutinizer
Standard grep uses POSIX BRE's (Basic regular...
Standard grep uses POSIX BRE's (Basic regular expressions) which do not include alternation. So one should use egrep for that which supports ERE's (Extended Regular Expressions). The reason that \|...
4,340
Posted By Scott
You don't need to use eval - or egrep if you...
You don't need to use eval - or egrep if you escape the infix |

Of course it runs... maybe it just doesn't find anything?

Show some of your input file

$ echo cats and dogs > file1
$...
4,340
Posted By pseudocoder
What does that mean in concrete terms? Is there...
What does that mean in concrete terms? Is there no output?

Did you try to run that command in the shell and see if it will work?
/usr/bin/grep -i 'dog\|cat' test.log
Also try
/usr/bin/grep -iE...
4,340
Posted By Scott
What about: #!/bin/sh TEST=test.log ...
What about:


#!/bin/sh
TEST=test.log
GREP=/usr/bin/egrep

$GREP -i 'dog|cat' ${TEST}
4,340
Posted By Scrutinizer
In line 1 and 3 all backslashes should lean the...
In line 1 and 3 all backslashes should lean the other way...
4,340
Posted By Christoph Spohr
Try: eval $GREP ... For indirect...
Try:


eval $GREP ...


For indirect references you have to use eval.

HTH Chris
1,826
Posted By pseudocoder
You removed the minus sign "-" from the last...
You removed the minus sign "-" from the last line, right?
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy