PDA

View Full Version : [SOLVED] awk issue



Drenriza
June 7th, 2012, 08:08 AM
Hi guys.

I have a for loop where i have the following code

password=$(awk 'NR==$count' 'test' |awk '{print $2}')

to grab a specific part of a line in each line. By hand this works fine and dandy.
But when i echo the $password in the for loop it's blank.

Has this something to do with you cannot use the $count inside the awk statement?

Kind regards.

Solved