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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to assign $x variable using awk ?

Status
Not open for further replies.

twist2tt

Programmer
Aug 3, 2001
3
0
0
EU
I am working on a ksh script with arguments. one of the argument passed to the script has the following format: parm1,parm2,parm3,parmX.....

I don't know how many parmX will be passed, it's variable and I would like to assign each parmX to a different $X variable using awk.

example:

if I have parm1,parm2,parm3 , I expect to have
$1=parm1
$2=parm2
$3=parm3
....

how to do that with awk ?

thanks
 
thanks a million for your suggestion, it works

Rgds,
Pat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top