![]() |
|
|
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 |
| SSH problems | ysk | UNIX for Advanced & Expert Users | 1 | 07-19-2007 06:16 AM |
| Problems AIX and SAN. | fjgonzalez | AIX | 4 | 07-18-2007 06:15 PM |
| Problems with Last | By_Jam | UNIX for Advanced & Expert Users | 3 | 09-29-2006 04:12 AM |
| Few problems | vivekshankar | UNIX for Dummies Questions & Answers | 3 | 05-21-2005 01:26 PM |
| 'make' problems (compliation problems?) | xyyz | UNIX for Advanced & Expert Users | 5 | 11-05-2001 10:47 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
awk problems
If i try the -f option for awk, i get the "awk: can't open " error message
The following awk statement works fine without the -f option `awk <$RULES '/^IGNORE_POLICY / { print $2 }'` Below how i turned on debugging to show what is happening, can someone provide me with some advice!!!! $RULES = /home/nberrors_rules_jm_NEW.txt_TEST $2 = ^219$ of the following (STATUS_MESSAGE ^219$ See BOA-NBU-1. Partial success) MESSAGE=`awk <$RULES '/^STATUS_MESSAGE / && '$STCODE' ~ $2 { for(a=3;a<NF+1;a++) { printf "%s ",$a }}'` ........... + + awk /^STATUS_MESSAGE / && 219 ~ $2 { for(a=3;a<NF+1;a++) { printf "%s ",$a }} + 0< /home/nberrors_rules_jm_NEW.txt_TEST awk: syntax error near line 1 awk: bailing out near line 1 MESSAGE= STCODE_POL_MESSAGE=`awk <$RULES '/^STATUS_MESSAGE_POLICY / && '$STCODE' ~ $2 && toupper("'$POLICY'") ~ toupper($3) { for(a=4;a<NF+1;a++) { printf "%s ",$a }}'` ........... + + awk /^STATUS_MESSAGE_POLICY / && 219 ~ $2 && toupper("emacromsq14") ~ toupper($3) { for(a=4;a<NF+1;a++) { printf "%s ",$a }} + 0< /home/nberrors_rules_jm_NEW.txt_TEST awk: syntax error near line 1 awk: bailing out near line 1 STCODE_POL_MESSAGE= |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|