Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

4 bytes removed, 09:39, 4 May 2021
LINUX PRACTICE QUESTIONS
# Write a Bash shell script that clears the screen and displays the text Hello World on the screen.<br><br>What '''permissions''' are required to run this Bash shell script?<br>What are the different methods that you can run this Bash shell script from the command line?<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''', then clears the screen again and welcomes the user by their name and tells them their age.<br><br>What '''comments''' would you add to the above script’s contents to properly document this Bash shell script to be understood for those users that would read / edit this Bash shell script’s contents?<br><br>
# Write a Bash shell script that will first set the value of a read-only variable called '''dogFactor''' to '''7'''. The script will then clear the screen and prompt the user to enter the age of a dog in human years (which will be stored into a variable called '''humanYears''').<br><br>The script will store in a variable called '''dogYears''' the value of ''humanYears x dogFactor''<br><br>The script will then clear the screen a second time and then display the age of the dog in ''“dog years”''.<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>
13,420
edits

Navigation menu