Answered step by step
Verified Expert Solution
Link Copied!

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 4 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:
$./script.sh
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:
4. Create a directory called big-directory.
5. Inside big-directory, create another directory called small-directory.
6. Create a file in small-directory called file-1.txt.
7. Write your name in file-1.txt. You can use the echo command alongside redirection.
8. View the contents of file-1.txt.
9. Append the numbers from 1 to 20 to file-1.txt, one number per line.
10. View the contents of file-1.txt.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions