For Programmers: Free Programming Magazines  


Home > Archive > AWK > January 2008 > Re: question on awk (FU2 set, comp.lang.awk posted)









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 Re: question on awk (FU2 set, comp.lang.awk posted)
Bill Marcum

2008-01-04, 6:58 pm

On 2008-01-04, loki harfagr <loki@theDarkDesign.free.fr> wrote:
>
>
> Well, the real answer depends much on the rest of what you
> expect to do overall, but just supposing you really want to
> fill a variable with previous problem description, it's
> possible to do for instance:
>
> $ woooop=$(awk '$NF=="RUNNING"{print $1}' FS=- yourfile)
>
> or backticks instead of bashism:
> $ woooop=`awk '$NF=="RUNNING"{print $1}' FS=- yourfile`
>

'$( )' isn't a bashism, it's a POSIXism.

Sponsored Links







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

Copyright 2008 codecomments.com