Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

2 bytes added, 17 February
INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS
# '''Save''' your editing changes and '''exit''' your text editor.<br><br>
# Issue the following linux command to run this shell script with the Bourne Shell (i.e. '''sh'''):<br><span style="color:blue;font-weight:bold;font-family:courier;">sh hello</span><br><br>You should notice that the shell name is now '''bash''' although you are trying to run it<br>in the ''Bourne Shell'' ('''sh'''). The "she-bang" line ''forces'' a new bash shell to be used to run your shell script.<br><br>
# It is a good idea to rename your shell script to include an '''extension''' to indicate <br>explain that the file this is a '''Bash Shell script ''' file (referred to as a "''portable Bash shell script''"). <br>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 for confirmation by issuing:<br><span style="color:blue;font-weight:bold;font-family:courier;">./hello.bash</span><br><br>
# Enter the following linux command to return to your Bash shell: <span style="color:blue;font-weight:bold;font-family:courier;">exit</span><br><br>
12,886
edits

Navigation menu