/bin/sh

Conor P. Cahill cpcahil at virtech.uucp
Tue Jan 16 12:03:33 AEST 1990


In article <620 at dr.uucp>, thormod at dr.uucp (Thormod N{ringsrud) writes:
> I often have a need to pick up the last parameter $1, $2 .. from
> the parameter list.  I have tried to catch it by referring $$#
> which gives me "processnumber"#.  Then I tried ${$#} which I really
> thought would work,  but got instead the message: bad variabel substitution.

The following will work in /bin/sh:

	`eval echo \\\${$#}`

Not easy to type, but it works for shells.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list