Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool2.mu.edu!news.cs.indiana.edu!att!cbnews!lvc From: lvc@cbnews.att.com (Lawrence V. Cipriani) Newsgroups: comp.unix.shell Subject: Re: Finding the last arg Summary: eval can be part of if Keywords: Bourne shell arguments Message-ID: <1991Jan1.155714.12760@cbnews.att.com> Date: 1 Jan 91 15:57:14 GMT References: <18476@shlump.nac.dec.com> Organization: Ideology Busters Inc. Lines: 18 In article <18476@shlump.nac.dec.com>, lan_csse@netrix.nac.dec.com (CSSE LAN Test Account) writes: > The pseudo-code I'd like to use is: > if [ -d last-command-line-arg ] > then > ... > fi If you don't need to have the last command line argument in a variable you can do this: if eval [ -d "\${${#}}" ] then ... fi -- Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com "I just love the smell of gunpowder!" - Bugs Bunny