Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

69 bytes added, 11:27, 3 September 2020
INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS
# Issue the following linux command to change to the Bourne Shell (a different shell than the default Bash):<br><span style="color:blue;font-weight:bold;font-family:courier;">sh</span><br><br>
# Issue the following linux command to confirm you are in the Bourne Shell:<br><span style="color:blue;font-weight:bold;font-family:courier;">echo $SHELL</span><br><br>You should see the output of the command that you are located in the Bourne Shell.<br><br>
# Run Re-run your '''hello''' shell script: <span style="color:blue;font-weight:bold;font-family:courier;">./hello</span><br><br>What shell does the shell script indicate is running?<br>You should notice that this script is being run in the Bash Shell, although the current shell is the Bourne shell.<br><br>
# It is a good idea to rename your shell script to include an extension to indicate that the file is a Bash Shell script file. Issue the following linux command to rename your shell script file:<br><span style="color:blue;font-weight:bold;font-family:courier;">mv hello hello.bash</span><br><br>
# Run your renamed shell script by issuing:<br><span style="color:blue;font-weight:bold;font-family:courier;">./hello.bash</span><br><br>
13,420
edits

Navigation menu