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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does this behave this way? 1

Status
Not open for further replies.

RFC1795

IS-IT--Management
Feb 13, 2003
76
US
Hi All,

Probably a simple one, but I'm not understanding why this isn't working the way I expect it to work:

Code:
AB="level20"

echo "filename50.cfg,$AB" | awk -F. '{print $1","$AB}'

Output:
filename50,filename50.cfg,level20

I'm expecting output to be:
Code:
filename50,level20

I'm confused... might be because its Friday :p

Thanks... T
 
Simple quoting problem
Code:
echo "filename50.cfg,$AB" | awk -F. '{print $1",'$AB'"}'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV! Quoting catches me out all the time [lol]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top