Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: /bin/sh Message-ID: <1990Jan16.010333.7405@virtech.uucp> Date: 16 Jan 90 01:03:33 GMT References: <620@dr.uucp> Organization: Virtual Technologies Inc. Lines: 16 In article <620@dr.uucp>, thormod@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 | +-----------------------------------------------------------------------+