Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk problem

Status
Not open for further replies.

parbhani

Technical User
Joined
Jul 3, 2002
Messages
125
Location
GB
Hi all,

I am using awk on Solaris. The simple command I am using is,

awk -v var1=1 '{print var1 }' databases

where databases is a file in current directory.

I get error,

awk: syntax error near line 1
awk: bailing out near line 1

What/where is the error ?
I have used similiar syntax with awk on AIX.
Please help.

Cheers
 
Try using nawk instead of awk

Jean Pierre.
 
Hi:

Try using nawk and your test script should work.

Regards,

Ed
 
Cheers friends

That worked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top