The importance of shell scripts that it takes commands for input from the file or the user and show them on the main screen. If you have to do the same thing again and again, then you have a good reason to use shell script. Shell scripting is used for various reasons and some of them being as follows.
Shell scripting can reduce errors because the scripts are tested very well. This reduces the chances of errors in a system. Also easy to use menus on the screen stop all errors that can happen. The shell script automatically checks the script, and this stops all time loss and bad script from being used. A skeleton of a menu in a BASH shell script.
#!/bin/bash
X = 0
While [$x = 0]
clear
echo "Do You want some meat? (y/n)"
read answer
case "$an$wer" in
x =1
;;
n)
echo "You said - No"
x = 1
;;
*)
elear
echo 'That is not an option"
sleep 3
;;
esac
done
This will always run in bash and shell.
Works Cited
"Why Shell Scripting." - Linux Shell Scripting Tutorial. Web. 31 Jan. 2016.
"Make a Menu in BASH Useing Case Statements." YouTube. YouTube. Web. 31 Jan. 2016.
"How Can I Create a Select Menu in a Shell Script?" Bash. Web. 31 Jan. 2016.
MLA formatting by BibMe.org.
.Created on January 31, 2016 by Lionel Sharpe (student) || professor Daniel Goodman at 6:40:08 PM
Form (rr15a) Code:3301627005-GA
Form (rr15b) Code:3301627006-NJ
Form (rr15c) Code:3301627007-FL
Form (rr15c) Code:3301627008-PA