How to acess Variable defined in perl script inside an awk call
In a perl script i am defining a variable called ColumnNum and assigning a value 5.
$ColumnNum=5;
I want to use this $ColumnNum to be used in the following awk call
$getCPUinfo = 'sar 1 1 |awk \'{print $($columnNum)}\'';
I am not able to use the variable since it is defined outside the awk .
Please help me with this..
|