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

problem with nb of parameters between unix shell and smit 2

Status
Not open for further replies.

despe

Programmer
Apr 24, 2001
2
MC
i want to make an interface under smit which running shell script (batch) but the numbers of parameters are not enough numerous (from $0 to $9) to accomplished what i wish to do cause sometimes i 've need more than 9 parameters ....
so can you help me in saying how i could found a way to dispose of more than 9 parameters in a shell or to reorganise the interface of smit to manage all these parameters. thanx
(ps :sorry for my bad english :) )
 

Not sure what you are asking...but the shift command in the shell is
used for positional parameters greater than 0 through 9 ...It is used to reference
parameters beyond the ninth one? I think ksh can have up to 99 parameters......
I think you can also access parameters greater than 9 by enclosing the number
in curly braces. i.e ${10}

The shift command shifts arguments 1-9 one position to the left and decrements
the count of arguments ($#)

To shift parameters by more than one position to the left, use shift n,
where n is the number of positions to shift. For example shift 3 will shift the
positional parameters to the left by three.


Not sure this is what you are looking for? Good luck
#-)
 
If you're using the Korn Shell, then you can simply use the positional parameters from ${1} to ${n} with n possibly greater than nine.
I hope it works...
Unix was made by and for smart people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top