probleme with awk arguments

Adel ESSAFI adelessafi at gmail.com
Wed Oct 19 17:20:13 UTC 2011


thx


2011/10/18 Miner, Jonathan W (US SSA) <jonathan.w.miner at baesystems.com>

>
> > From: users-bounces at lists.fedoraproject.org [
> users-bounces at lists.fedoraproject.org] On Behalf Of Adel ESSAFI
> >
> > [adel at localhost ~]$ C=g
> > [adel at localhost ~]$ awk  -v c=$C '{ print $c }' coran.pls
>
> Drop the dollar sign from the awk print statement...
>
> awk -v C=$C '{print c}' coran.pls
>
> The dollar sign references the FIELD on the input.  So $c will display the
> c'th field of the line; a more familiar example is NF, or the number of
> fields.  By itself, NF, prints a number, but $NF prints the last field on
> the line.
> --
> users mailing list
> users at lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>



-- 
PhD candidate in Computer Science
Address
3 avenue lamine, cité ezzahra, Sousse 4000
Tunisia
tel: +216 97 246 706 (+33640302046 jusqu'au 15/6)
fax: +216 71 391 166
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20111019/174c04b6/attachment.html 


More information about the users mailing list