Question: Assume you have a shell script named myFirstShell.sh with its code below, and assume you are in the same directory where the file myFirstShell.sh is,
Assume you have a shell script named myFirstShell.sh with its code below, and assume you are in the same directory where the file myFirstShell.sh is,
1 #!/bin/bash
2 #This is my first script
3 pwd
4 echo -n "Input the name of the file "
5 read YOURFILE
6 LOCATION =/home/user
7 find $LOCATION -name $YOURFILE
8 echo End of script
a- Write the command to run myFirstShell.sh (1.5 marks)
b- Change the script so that the value of YOURFILE is given as positional parameter (assume filename is myfile), and write the command to execute the script in this case. (4 marks, 2 marks)
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
