Question: Create a directory and name it Lin_a2 and do the following tasks within Lin_a2. Show each command with a screenshot. a. echo Jordan >> file1

Create a directory and name it Lin_a2 and do the following tasks within Lin_a2. Show each command with a screenshot.

a. echo Jordan >> file1

echo Mitch >> file2

b. Write a script to swap the names of two files, file1 and file2. After running the script, file1 should contain "Mitch" and file2 should contain "Jordan".

c. Write a script shell.sh that first assigns variables abc with value 1,2,3, respectively and then print the product of the three variables.

d. Revise the script to be shell2.sh such that it obtains the values from the terminal and assign them to variables a, b, c. The script should print the product of the variables. For instance, ./shell2.sh 2 3 4 should print 24.


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution 1 Creating the directory and changing our working directory to it a execut... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!