Question: From Step 4 onwards, write the correct commands in your script file. You can open your script simply by double clicking it , which should
From Step onwards, write the correct commands in your script file. You can open your script simply by
double clicking it which should open it in Emacs or the default editor if you havent installed Emacs
Remember that you can execute your script by first making it executable you only need to do this
once:
$chmod x script.sh
And the following in the command:
$bash myfirstscript.sh
Or you could add a shebang line in your script to execute it by running:
$scriptsh
Experiment with both approaches and use the one you feel the most comfortable with. From a
professional standpoint, I think that using the shebang line is better. Then, write the necessary
commands in your script to do the following:
Create a directory called bigdirectory.
Inside bigdirectory, create another directory called smalldirectory.
Create a file in smalldirectory called filetxt
Write your name in filetxt You can use the echo command alongside redirection.
View the contents of filetxt
Append the numbers from to to filetxt one number per line.
View the contents of filetxt
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
