Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started