![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to access values of awk/nawk variables outside the awk/nawk block? | saniya | Shell Programming and Scripting | 5 | 05-13-2008 08:37 AM |
| How to use awk instead of nawk? | kinmak | UNIX for Dummies Questions & Answers | 2 | 05-07-2008 05:34 AM |
| nawk & awk | sd12 | UNIX for Advanced & Expert Users | 5 | 05-05-2008 11:46 AM |
| nawk/ksh help | DeltaX | Shell Programming and Scripting | 0 | 03-06-2008 03:54 PM |
| nawk use | ctap | UNIX for Advanced & Expert Users | 2 | 01-17-2008 06:45 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
nawk help
What am I doing wrong here? I get syntax error.
I am trying to parse a file looking for the lines with "running" as the first field then print the 5th field, then looking at the 9th field for specific values and writing the whole line to a junk file. nawk '; {if ($1 == "running") print $1 >> ./junk1; if ($9 == "S73isid") {print $0} >> ./junk1; if ($9 == "S750vxpal.gridnode") {print $0} >> ./junk1; if ($9 == "S75vxpal.StorageAgent") {print $0} >> ./junk1; if ($9 == "S75vxsmfd") {print $0} >> ./junk1; if ($9 == "S760vxpal.actionagent") {print $0} >> ./junk1; print}' rc2.d_listing Thanks!! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|