The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-07-2005
Junes Junes is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 1
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0