For Programmers: Free Programming Magazines  


Home > Archive > AWK > January 2006 > AWK command help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AWK command help
wotm

2006-01-16, 6:57 pm

AIX 5.1


I am running the following command after variables are read:

awk '{if($1~/^ "$code"/) print $0 }' LCADPIN"$file".2006"$mo""$day"* >
$ADPIN/ADPIN

When I add the actual code WZN in place of "$code", this command works
fine. The code is at the begining ( ^) of the LCADPIN record. I have
tried using single quotes around "$code" and have tried placing a space
aftere (^}.

Any help would be appreciated.

Ed Morton

2006-01-16, 6:57 pm



wotm wrote:
> AIX 5.1
>
>
> I am running the following command after variables are read:
>
> awk '{if($1~/^ "$code"/) print $0 }' LCADPIN"$file".2006"$mo""$day"* >
> $ADPIN/ADPIN
>
> When I add the actual code WZN in place of "$code", this command works
> fine. The code is at the begining ( ^) of the LCADPIN record. I have
> tried using single quotes around "$code" and have tried placing a space
> aftere (^}.
>
> Any help would be appreciated.
>


Looks like you're calling awk from shell, so read question 24 in the
comp.unix.shell FAQ (http://home.comcast.net/~j.p.h/cus-faq-2.html#24).

Ed.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com