Getting the last argument passed to a shell script by IT Nursery $1 is the first argument. $@ is all of them. How can I find the last argument passed to a shell script? 29 Answers 29