Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Awk script debug

Status
Not open for further replies.

sandeepmur

Programmer
Dec 14, 2003
295
PT
Hi,

I am very new to AWK programming and have inherited some AWK script which I am unable to comprehend.. following is the script..appreciate if anyone can explain what it does !:

function setARGS {

NARGS=`echo $ARGS | awk '{print NF}'`

if (test $NARGS -gt 0); then {
I=1;
while (test $I -le $NARGS); do

ARG_TO_DEF=ARG$I
DEF_TO=`echo $ARGS | awk '{print $i}' i=$I`
eval $ARG_TO_DEF="$DEF_TO"

let I+=1;
done
} fi

TIa,
 
man ksh
man awk

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top