Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

Provide a model of performance management

Answered: 1 week ago