Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

87 bytes removed, 08:22, 19 July 2020
LINUX PRACTICE QUESTIONS
# Write a Bash shell script that clears the screen and displays the text Hello World on the screen.<br><br><br><br><br>What permissions are required to run this Bash shell script?<br><br><br>What are the different ways that you can run this Bash shell script from the command line?<br><br><br># Write a Bash shell script that clears the screen, prompts the user for their '''full name''' and then prompts the user for their '''age''',<br>then clears the screen again and welcomes the user by their name and tells them their age.<br> <br><br><br><br><br><br><br>What comments would you add to the above script’s contents to properly document this Bash shell script to be understood<br>for those users that would read / edit this Bash shell script’s contents?<br> <br><br># Write a Bash shell script that will first set the value of a variable called '''number''' to '''23''' and make this variable '''read-only'''.<br>Then the script will clear the screen and prompt the user to enter a value for that variable called number to another value.<br>Have the script display the value of the variable called number to prove that it is a read-only variable.<br><br><br><br><br>When you ran this Bash shell script, did you encounter an error message?<br>How would you run this Bash shell script, so the error message was NOT displayed?<br><br><br># Write a Bash shell script that will clear the screen and then display all arguments that were entered after your Bash shell script when it was run. Also have the Bash shell script display the number of arguments that were entered after your Bash shell script.<br><br><br><br><br><br><br><br>
'''PART B: WALK-THRUS'''
:WRITE OUTPUT FROM ISSUING:
:'''./walkthru1.bash'''
 
 
 
 
 
:WRITE OUTPUT FROM ISSUING:
:'''./walkthru2.bash apple orange banana'''
<br><br><br><br><br>
[[Category:ULI101]]
13,420
edits

Navigation menu