Question: Bash scripting PART 1 : You will create a script that demonstrates various scripting concepts, including echoing text, using variables, and displaying built - in
Bash scripting
PART : You will create a script that demonstrates various scripting concepts, including echoing text, using variables, and displaying builtin variables.
The script needs to do the following:
Display "Scripting is fun
Define two variables: variable with the value "Hello" and variable with the value "Bash".
Create a greeting using the defined variables and echo it with the message "Hello, welcome to the world of Bash scripting!".
Use builtin variables to display:
Your current bash path
The Bash version you are using
The PID of the bash process
Your home directory
Your current working directory
Your hostname
PART :
Write a script that will count how many executable commands are in your current PATH. The script needs to count the number of executable files rather than just number of files. When finished, it needs to display number of commands and nonexecutables are in the default PATH
Here is the output from my machine Mac:
adiz$ countcommands.sh
commands, and entries that weren't executable
PART :
In this part you will write a Bash script that simulates a simple calculator. The script needs to have a function called MYCALC that can process user input such as this:
plus
minus
times
dividedby
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
