Pass, Display Unix Linux Shell Arguments/Args

The following shell script shows how * Use At Own Risk

cat # # sh one two three # echo There are $# arguments to $0: $* echo first argument: $1 echo second argument: $2 echo third argument: $3 echo here they are again: $@

To run The following shell script enter

sh one two three There are 3 arguments to one two three first argument: one second argument: two third argument: three here they are again: one two three
Go Back to:

This Webpage and Contents Created by Steven C. Howes © Howes-IT-Going 2009-2012 All Rights Reserved.