Changes

Jump to navigation Jump to search
No change in size ,  06:18, 30 January 2020
no edit summary
Line 1: Line 1: −
```$1``` is the first command-line argument passed to the shell script. Also, know as Positional parameters. For example, $0, $1, $3, $4 and so on. If you run ./script.sh filename1 dir1, then:
+
'''$1''' is the first command-line argument passed to the shell script. Also, know as Positional parameters. For example, $0, $1, $3, $4 and so on. If you run ./script.sh filename1 dir1, then:
 
* $0 is the name of the script itself (script.sh)
 
* $0 is the name of the script itself (script.sh)
 
* $1 is the first argument (filename1)
 
* $1 is the first argument (filename1)

Navigation menu