Exercise 1

Exercise

Time: 20 min

Create a shell script that automates the following tasks:

  1. Create a directory named mydir in the scratch directory under your user directory.

  2. Create a new file insde mydir named myfile.txt using the touch command.

  3. Write a message “Hello, World!” into myfile.txt using the echo command echo "your text" > myfile.txt.

  4. List the contents of mydir to verify that myfile.txt was created successfully.