sandeepmur
Programmer
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,
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,