![]() |
|
|
|
|
|
|
2
31st October 18:10
External User
Posts: 1
|
This is the correct syntax for what you're trying to do:
status[$count]=`echo "$2" | awk -F: -v cnt="$count" '{ print $cnt }'` See question 24 in the comp.unix.shell FAQ, http://home.comcast.net/~j.p.h/cus-faq-2.html#24. Having said that, the above script doesn't make sense because you're setting count to zero every time round the loop and you don't need awk to do what you want anyway. You should post a questioin to comp.unix.shell asking for help on generally fixing the script. Ed. |
|