Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!xanth!wyvern!tmanos From: tmanos@wyvern.uucp (Tom Manos) Newsgroups: comp.unix.questions Subject: Re: $argv[$#argv] Message-ID: Date: 27 May 91 00:25:31 GMT References: <1991May25.204543.6428@midway.uchicago.edu> Distribution: usa Organization: Tidewater UNIX Users Group Lines: 21 goer@ellis.uchicago.edu (Richard L. Goerwitz) writes: >It's not obvious to me how to take the value of the last argv >element with /bin/sh, the way one can do with the C-Shell using >subscripts. Perhaps an ignorant question, but how do? >-- This works for me: #!/bin/sh eval echo '$'{$#} Should work for you, too. Break out TFM to understand how it works. Tom -- Tom Manos Norfolk, VA tmanos@wyvern (...!xanth!wyvern!tmanos) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- I gotta get away from this day to day running around. Everybody knows this is nowhere. - Neil Young