Re: Running commands as variables

2002-01-16 Thread John W. Krahn
David Ulevitch wrote: > > I am trying to do this: > $ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep >'ns1-in' |awk '{print $2}'`; > > but perl thinks the $2 is for it so it evals it (to '') and then awk > in return prints the whole line, as opposed to the $

Re: Running commands as variables

2002-01-16 Thread Briac Pilpré
In article <[EMAIL PROTECTED]>, David Ulevitch wrote: > I am trying to do this: > $ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep >'ns1-in' |awk '{print $2}'`; > > but perl thinks the $2 is for it so it evals it (to '') and then awk > in return prints the wh

Re: Running commands as variables

2002-01-16 Thread Brett W. McCoy
On Wed, 16 Jan 2002, David Ulevitch wrote: > I am trying to do this: > $ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep >'ns1-in' |awk '{print $2}'`; > > but perl thinks the $2 is for it so it evals it (to '') and then awk > in return prints the whole line, a