bje
asked on
use awk and cut
Hello,
Have a file where I need to look at the first line and then look at a postion 30 - 45 on that line and cut the value to be use in a variable.
I have
testname=$(awk 'NR==1|{cut -c30-45}' $file )
thanks
Have a file where I need to look at the first line and then look at a postion 30 - 45 on that line and cut the value to be use in a variable.
I have
testname=$(awk 'NR==1|{cut -c30-45}' $file )
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
echo $testname
"awk" does not have "cut". "awk" has "substr()".