Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!tuvie!iiasa!wnp From: wnp@iiasa.AT (wolf paul) Newsgroups: comp.unix.questions Subject: Re: KSH script arguments Message-ID: <858@iiasa.UUCP> Date: 30 Aug 90 08:15:37 GMT References: Reply-To: wnp@iiasa.UUCP (wolf paul) Organization: IIASA, Laxenburg/Vienna, Austria, Europe Lines: 16 In article jonc@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@uunet.uu.net BITNET: tuvie!iiasa!wnp@awiuni01.BITNET * * * * Kurt Waldheim for President (of Mars, of course!) * * * *