KSH script arguments
wolf paul
wnp at iiasa.AT
Thu Aug 30 18:15:37 AEST 1990
In article <b4CC02oVc3Jx01 at amdahl.uts.amdahl.com> jonc at amdahl.uts.amdahl.com (Jonathan Chang) writes:
)How can I extract the last argument to a ksh script?
)
)P.S. Just to add to the challenge, the number of arguments is variable.
This works; whether it is the most elegant solution I don't know:
LASTARG=$(eval "echo \$$#")
Anyone know of a better way?
--
Wolf N. Paul, IIASA, A - 2361 Laxenburg, Austria, Europe
PHONE: +43-2236-71521-465 FAX: +43-2236-71313 UUCP: uunet!iiasa.at!wnp
INTERNET: wnp%iiasa.at at uunet.uu.net BITNET: tuvie!iiasa!wnp at awiuni01.BITNET
* * * * Kurt Waldheim for President (of Mars, of course!) * * * *
More information about the Comp.unix.questions
mailing list