![]() |
|
|
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 |
| Running command inside awk | Raghuram.P | Shell Programming and Scripting | 1 | 08-09-2007 06:54 AM |
| if within nawk command | kshelluser | UNIX for Dummies Questions & Answers | 1 | 11-30-2006 07:02 AM |
| nawk command not found | 12yearold | Shell Programming and Scripting | 5 | 07-07-2006 03:40 PM |
| nawk command clarification | Tux_Raju | Shell Programming and Scripting | 2 | 07-28-2005 10:28 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
case command inside awk/nawk
well I found lot of topics about awk..about if command in awk..
but I had to implement this: nawk -F"|" ' $47 ~ /0R0011/ { print > ("/home/user/M/MC.tmp" )} $47 ~ /0R0012/ { print > ("/home/user/M/DuSI.tmp" )} $47 ~ /0R0014/ { print > ("/home/user/M/FF.tmp" )} $47 ~ /0R0018/ { print > ("/home/user/M/Cg.tmp" )} $47 ~ /0R0010/ { print > ("/home/user/M/M1.tmp" )} ' File0 basicly I did it with if command nawk -F "|" ' { if ($47=="0R0011") { print $0 ; } } ' File0 > MC.tmp but for one case only ..is there some kind of case/switch command inside awk/nawk..?? thanks a lot |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|