13,420
edits
Changes
→INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS
# Use a text editor to edit the shell script called '''hello'''<br><br>
# Add the following line to the bottom of the file:<br><span style="font-family:courier;">ps -o cmd= -p $$|cut -d" " -f1</span><br><br>'''NOTE:''' This command displays the name of the shell that the shell script<br>is running within.<br><br>
# '''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>
# 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 $0</span><br><br>You should see the output of the command that you are located in shows '''sh''' (i.e. the '''Bourne Shell''').<br><br>