home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!caen!sdd.hp.com!hp-col!jimr
- From: jimr@col.hp.com (Jim Rogers)
- Subject: Re: how to get the last pos. parameter in ksh?
- Sender: news@col.hp.com (Usenet News)
- Message-ID: <1992Nov10.150853.1975@col.hp.com>
- Date: Tue, 10 Nov 1992 15:08:53 GMT
- References: <KURO.92Nov9112643@vodka.Eng.Sun.Com>
- Organization: HP Colorado Springs Division
- Lines: 11
-
- kuro@vodka.Eng.Sun.Com (Teruhiko Kurosaka) writes:
- > How can I write a ksh function to examine the last parameter (argument)
- > of the command line? I.e., I'd like to know how to access argv[argc-1].
-
-
- last=`eval echo \$\{$#\}`
- --
- Jim Rogers
- Hewlett-Packard Company
-
- jimr@col.hp.com
-