Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!utrcu1!infnews!infnews!stadt From: stadt@cs.utwente.nl (Richard van de Stadt) Newsgroups: comp.unix.questions Subject: Variable substitition Message-ID: <1990Nov30.092424@cs.utwente.nl> Date: 30 Nov 90 08:24:24 GMT Sender: usenet@cs.utwente.nl Reply-To: stadt@cs.utwente.nl (Richard van de Stadt) Organization: University of Twente, Dept. of Computer Science Lines: 8 Is there some sort of variable substitution possible in a shell script to get the value of the last argument supplied to the script? I don't mean shifting the arguments until one is left. I'd like to know if something like awk's $NF, in which NF means the number of fields, and $NF means the value of the last field, is possible. ${$#} results in an error message. -- R.R. van de Stadt (Richard) Email: stadt@cs.utwente.nl