Operating System - Linux
1755751 Members
5173 Online
108837 Solutions
New Discussion юеВ

egrep with variable on input

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: egrep with variable on input

>if [[ $(echo $TNSSTRING | egrep -i (ORA-01|ORA-27) | wc -l) -gt 0 ]]; then

As JRF says, it doesn't like your naked ERE. Any reason you need to use the egrep hammer instead of grep?
echo "$TNSSTRING" | grep -q -i -e ORA-01 -e ORA-27
if [[ $? -eq 0 ]]; then
Leo The Cat
Regular Advisor

Re: egrep with variable on input

Hi Guys

Thank you very much for you answering, I need to study all this staff.

James ! Hey ;-) look my old posts and you'll see that I put very often points. The problen during some times is that I have no time also for studying your posts (sic) and I don't want to put 10 every times or 9 or 8 or 2 without reflexion !

If all is good I hope to solve this egrep problem tomorrow and of course I'll come back here for closing thread anf submit points. I play the game every time this is possible ans it's not always easy.

See you Guys
and ... see you later
Bye
James R. Ferguson
Acclaimed Contributor

Re: egrep with variable on input

Hi Den:

> James ! Hey ;-) look my old posts and you'll see that I put very often points.

I don't disagree and that wasn't my point.

> The problen during some times is that I have no time also for studying your posts (sic) and I don't want to put 10 every times or 9 or 8 or 2 without reflexion !

I'll take that remark as a compliment :-)

I agree that knee-jerk point assignment is wrong and meaningless. However, a little quid pro quo (reflection, if you will) is quite appropriate in my opinion. If you feel that a post doesn't need or deserve further analysis/commentary, then please consider marking it 'closed'. You can always reopen it at a later date!

Regards!

...JRF...
Leo The Cat
Regular Advisor

Re: egrep with variable on input

;-)

Have a nice day James.
Sure I'll be back here !

Bests Regards
Den
Leo The Cat
Regular Advisor

Re: egrep with variable on input

I have no real solution without use a temporary files.

Thanks to you Guys.