Re: probleme with awk arguments

2011-10-19 Thread Adel ESSAFI
thx 2011/10/18 Miner, Jonathan W (US SSA) jonathan.w.mi...@baesystems.com 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

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 file

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