Question: A.Type the following commands using a text editor and save it as a yourname .sh (Example: ahmad.sh). echo Hello world > helloworld.jar mkdir cars; mkdir

A.Type the following commands using a text editor and save it as a yourname.sh (Example: ahmad.sh).

echo Hello world > helloworld.jar

mkdir cars; mkdir dates; mkdir fruits drinks

cd cars; echo Honda Accord > accord.c

cp accord.c civic.c; echo proton > proton.c; cd ../dates;

date > dateoftheday

cat dateoftheday > appointment

cd ../fruits; echo apple > apple.txt; cat apple.txt > orange.txt

cd ../drinks; cp ../cars/*.* .; cp ../fruits/*.* .;

cp ../*.jar .

Execute the script and draw a tree structure that contains created directories and files. The parent node of the directory begin with $HOME or ($fedora) directory.[4 marks]

Print screen the script that you type;

Then draw the tree

B. Write an interactive bash script that will read a type of file extension, display all those files, and count the number of files (the script file must be in cars directory). To validate your script, display c program files, and enter *.c as the input to the bash script.[4 marks]

#/bin/bash

complete the code

print screen the bash script here and run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!