Hi,
I am new and i am looking for counting number of arguments from a parameter file and for exporting them into dedicated variables.
parameter file :
[SOURCE]
VARSRC=login1/pwd1,login2/pwd2,login3/pwd3
[TARGET]
VARTGT=login1/pwd1,login2/pwd2,login3/pwd3,login4/pwd4
Q1 : How can I know how many arg I have in source and store it into a variable (count_src=3) and in target (count_tgt=4) ?
Q2 : How can I export each on them into dedicated variables (login1 to var1, pwd2 to var2, etc.) ?
Context :
- The number of couple login/pwd can change in SRC and TGT
- ksh on AIX
Many Thanks in advance.
TTF.
I am new and i am looking for counting number of arguments from a parameter file and for exporting them into dedicated variables.
parameter file :
[SOURCE]
VARSRC=login1/pwd1,login2/pwd2,login3/pwd3
[TARGET]
VARTGT=login1/pwd1,login2/pwd2,login3/pwd3,login4/pwd4
Q1 : How can I know how many arg I have in source and store it into a variable (count_src=3) and in target (count_tgt=4) ?
Q2 : How can I export each on them into dedicated variables (login1 to var1, pwd2 to var2, etc.) ?
Context :
- The number of couple login/pwd can change in SRC and TGT
- ksh on AIX
Many Thanks in advance.
TTF.