Debian Codegraph @

ex34.sh

raw symbols SCIP
1 #!/bin/bash
2 # ex34.sh
3 # Script "set-test"
4
5 # Invoke this script with three command-line parameters,
6 # for example, "sh ex34.sh one two three".
7
8 echo
9 echo "Positional parameters before set \`uname -a\` :"
10 echo "Command-line argument #1 = $1"
11 echo "Command-line argument #2 = $2"
12 echo "Command-line argument #3 = $3"
13
14
15 set `uname -a` # Sets the positional parameters to the output
16 # of the command `uname -a`
17
18 echo
19 echo +++++
20 echo $_ # +++++
21 # Flags set in script.
22 echo $- # hB
23 # Anomalous behavior?
24 echo
25
26 echo "Positional parameters after set \`uname -a\` :"
27 # $1, $2, $3, etc. reinitialized to result of `uname -a`
28 echo "Field #1 of 'uname -a' = $1"
29 echo "Field #2 of 'uname -a' = $2"
30 echo "Field #3 of 'uname -a' = $3"
31 echo \#\#\#
32 echo $_ # ###
33 echo
34
35 exit 0