![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| Bourne and decimals?? | kdyzsa | Shell Programming and Scripting | 1 | 05-06-2008 07:54 PM |
| Bourne Script help | Pits | Shell Programming and Scripting | 2 | 09-05-2007 11:15 PM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-29-2006 11:42 PM |
| bourne script help | Heedunk | Shell Programming and Scripting | 1 | 02-05-2004 04:49 PM |
| bourne if, then, else | Priest_Ridden | UNIX for Dummies Questions & Answers | 2 | 12-12-2001 07:18 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
GREP in Bourne
I have a problem.
Suppose I have a log transport.log with the ff: >> tp finished with return code: 203 meaning: wrong syntax in tp call << I'm working on creating a script to find out if there are error are not. Unfortunately, the only way to check if there is error is if the return code is 0. I've tried to grep it with 'grep 0 transport.log` but it also return the one with 203. I just need to know if the return code is 0. not 10, no 90, not 103, but 0, and since grep searches for patterns it always returns even if the code is 10, 470. Anyway around this? I need to get the line if the return code is 0. |
| Forum Sponsor | ||
|
|
|
|||
|
Hi,
for solving the problem , u can grep on return code: 0 instead of 0. on HP machine, u can use -x option. when u use x oprion, it will match only distinct words and not substrings. Can somebsoy suggest me whats the equivalent on solaris and aix. |