Grep include but not....
am 13.09.2007 18:51:18 von RocketManIs there a way to write a grep that will include 'sqlplus' but not
'sqlplus -S'?
Is there a way to write a grep that will include 'sqlplus' but not
'sqlplus -S'?
On Sep 13, 11:51 am, RocketMan
> Is there a way to write a grep that will include 'sqlplus' but not
> 'sqlplus -S'?
The version of grep that I have (AIX) has a -x flag.
so:
grep -x sqlplus
Will do what you want.
Miles
On Thu, 13 Sep 2007 09:51:18 -0700, RocketMan
>
>
> Is there a way to write a grep that will include 'sqlplus' but not
> 'sqlplus -S'?
>
grep 'sqlplus' | grep -v 'sqlplus -S'
awk '/sqlplus/ && !/sqlplus -S/'
--
QOTD:
"In the shopping mall of the mind, he's in the toy department."
RocketMan wrote:
> Is there a way to write a grep that will include 'sqlplus' but not
> 'sqlplus -S'?
or grep '\bsqlplus\b'
--
s/.../.gotovchits/g for email.
In our last episode, the evil Dr. Lacto had captured our hero,
ivan...@auriga.ru, crazydm@gmail.com, who said:
>RocketMan wrote:
>
>> Is there a way to write a grep that will include 'sqlplus' but not
>> 'sqlplus -S'?
>or grep '\bsqlplus\b'
Maybe your grep is different from my grep, but '\bsqlplus\b' matches
'sqlplus -S'.
--hymie! http://lactose.homelinux.net/~hymie hymie@lactose.homelinux.net
------------------------ Without caffeine for 318 days ------------------------