Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Several Pipes i...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2094 of 2297
Post > Topic >>

Several Pipes inside an awk script

by aitatanit@[EMAIL PROTECTED] Dec 6, 2007 at 11:40 AM

Hi all,

This series of awk commands work great on the command line:
$ awk -F\; '/RAWIMUSA/{print $2}' 1.txt | awk -F\* '{print $1}' | awk -
F, '{print $1 "," $2 "," substr($3, 7,1) ","    $4 "," $5 "," $6 ","
$7 "," $8 "," $9}' > out


However, when I put this in a script, I get the following error:

$ awk: 1: unexpected character '.'


(I removed the awk words from the above command)

I removed the file 1.txt from inside the script and tried to redirect
it's output to the script by using the cat command by I got the same
error. Can you please let me know what I am doing wrong and what I
need to do to fix it?

Thanks
 




 5 Posts in Topic:
Several Pipes inside an awk script
aitatanit@[EMAIL PROTECTE  2007-12-06 11:40:53 
Re: Several Pipes inside an awk script
Cesar Rabak <csrabak@[  2007-12-06 18:37:41 
Re: Several Pipes inside an awk script
aitatanit@[EMAIL PROTECTE  2007-12-06 12:50:06 
Re: Several Pipes inside an awk script
Ed Morton <morton@[EMA  2007-12-06 15:38:31 
Re: Several Pipes inside an awk script
aitatanit@[EMAIL PROTECTE  2007-12-06 13:50:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 20:34:04 CDT 2008.