Re: probleme with awk arguments

2011-10-19 Thread Adel ESSAFI
thx 2011/10/18 Miner, Jonathan W (US SSA) > > > From: users-boun...@lists.fedoraproject.org [ > users-boun...@lists.fedoraproject.org] On Behalf Of Adel ESSAFI > > > > [adel@localhost ~]$ C=g > > [adel@localhost ~]$ awk -v c=$C '{ print $c }' coran.pls > > Drop the dollar sign from the awk pri

RE: probleme with awk arguments

2011-10-18 Thread Miner, Jonathan W (US SSA)
> From: users-boun...@lists.fedoraproject.org > [users-boun...@lists.fedoraproject.org] On Behalf Of Adel ESSAFI > > [adel@localhost ~]$ C=g > [adel@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 d

probleme with awk arguments

2011-10-18 Thread Adel ESSAFI
Hello, I have a problem with passing arguments for awk. I set a variable C as charecter (or string). Then put that variable as argument for awk. Unfortuanatly, I go not get the needed result. For example, in this example, I get the content of the file but I expect it write "g" as many lines as fil