Text: Part 2 - Write Shell Scripts
Read about Shell Scripting and review the examples. Also learn about Vi Editor/Vi Commands.
A- In a file, write a series of Linux commands that perform the following tasks (assume you are in your home directory):
1. Create a directory called myprofile.
2. Create a subdirectory in myprofile called myemails.
3. Create a file called mytest.txt in the myprofile directory.
4. Copy mytest.txt into yourtest.txt.
5. Copy mytest.txt into ourtest.txt and place the new file in the myemails directory.
6. Show the directory tree for the myprofile directory.
7. Using a for loop shell script command, write l-1000 in ourtest.txt file. You should have 1000 lines: 1, 2, 3, ...
8. Display the last 10 values in ourtest.txt file.
Submission for Part 2.A: Submit the Linux commands for each section.
B- In this part, you are expected to write a Linux Shell Script to perform the following tasks:
1. Display your IP address.
2. Display your MAC address.
3. Display your HOSTNAME.
4. Save the above information in a file called mynetwork.txt. Note that the created file must only have three lines in it.
Submission for Part 2.B: Submit your working script and the output of your scripts for Part 2.