Shell Scripting

Ben Smithurst ben at
Tue Mar 7 22:34:55 GMT 2000

Gary Brewer wrote:

> What I really need to know is how would I get the string in the last
> argument passed ?
> I thought it was ${$#} but in csh this just echoed a number not a string.


eval foo=\$$#
echo $foo

maybe there's a cleaner way.


echo $argv[$#argv]

(of course, csh shouldn't be used for scripts.)

Ben Smithurst / ben at / PGP: 0x99392F7D

More information about the Ukfreebsd mailing list