![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing global variable to a function which is called by another function | sars | Shell Programming and Scripting | 4 | 06-30-2008 08:39 AM |
| egrep help | Darklight | Shell Programming and Scripting | 1 | 04-17-2008 11:34 PM |
| egrep | DNAx86 | Shell Programming and Scripting | 7 | 01-18-2008 04:59 AM |
| Egrep cheat sheet anywhere? Looking for meaning of egrep -c | leelm | UNIX for Dummies Questions & Answers | 2 | 01-11-2008 11:37 AM |
| help with egrep | akDBA | UNIX for Dummies Questions & Answers | 9 | 08-02-2006 02:33 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have exported
LOGAME=/TESTXXX O_M=/dev/vgibbs/lvxxx I am trying to egrep the same along with bdf as bdf |-egrep -w '$LOGNAME|${O_M}' *** ( I want to grep both pattern with variable ) However the same is giving "egrep: $ anchor not at end of pattern." The above output works if I give bdf |-egrep -w 'TESTXXX|/dev/vgibbs/lvxxx' I want the above funtionality *** to be called in script, but the same is not giving the desired output . I am working on HP-UX system and using ksh shell. I am on to this for long and I am stuck with this. I am waiting for your assistance so as to proceed with creation of my script. This to be made live by tomorrow. Thanks and Regds Kamlesh. |
| Forum Sponsor | ||
|
|
|
|||
|
I have already tried that. It's not working. When I call the same in scripts it gives output as :-
+ egrep -w /dev/vgibbsmig/lvxxx| + bdf egrep: Unknown err. The script is as follows:- check_org() { bdf |egrep -w "${O_FS}|${O_M}" if [ $? -eq 0 ] then echo "Original file system mounted " else echo "Original NOT MOUNTED" exit 1 fi } Last edited by kamlesh_p; 10-19-2005 at 06:36 AM. |
|||
| Google UNIX.COM |