Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a linux Unix script file that does the following. Task 1. bash script named script The name of your bash script must be scriptl

Make a linux Unix script file that does the following.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Task 1. bash script named script The name of your bash script must be scriptl and below is a description of what it should do when executed. Note that the name of the script, the names of the files and directories, and the messages must be used exactly as described here, including the lower and upper cases 1. script1 creates in the current directory a subdirectory PROJ2 and then displays PROJ2 directory created 2. Then in the directory PROJ2 creates a subdirectory proj2 and then displays PROJ2/proj2 directory created 3. In proj 2 it creates 10 ASCII text files named proj2 1, ..., proj2 10. The content of proj2 1 consists of two lines: the first saying File proj2 1 and the second saying Followed by proj2 2. The content of proj2 2 consists of two lines File proj2_2 and Followed by proj2_3 etc. Note that the last file proj2_10 contains two lines, the first saying File proj2 10 and the second saying Not followed. (the first 9 files ought to be created in a single loop) 4. Then the script displays All regular files of PROJ2/proj2 and then displays just the names of all regular files in PROJ2/proj2 (note that non-regular files are not to be displayed, and since the 1s command displays ll entities in the directory, you cannot use ls for this purpose) 5. Then the script displays Contents and then it displays contents of all regular files in PROJ2/proj2 separated by a 6. Then it moves all files among proj2_1, ..., proj2_10 containing a character 4 or a character or 5 or a character 8 7. Then the script displays All regular files of PROJ2 and then displays just the names of all regular files in 8. Then it creates a single file in PROJ2 named BIGFILE that contains all the lines from all the regular files in PROJ2 line consisting of dashes (character -) from PROJ2/proj2 to PROJ2 PROJ2 9. Then it removes all other regular files from PROJ2 except BIGFILE Task 1. bash script named script The name of your bash script must be scriptl and below is a description of what it should do when executed. Note that the name of the script, the names of the files and directories, and the messages must be used exactly as described here, including the lower and upper cases 1. script1 creates in the current directory a subdirectory PROJ2 and then displays PROJ2 directory created 2. Then in the directory PROJ2 creates a subdirectory proj2 and then displays PROJ2/proj2 directory created 3. In proj 2 it creates 10 ASCII text files named proj2 1, ..., proj2 10. The content of proj2 1 consists of two lines: the first saying File proj2 1 and the second saying Followed by proj2 2. The content of proj2 2 consists of two lines File proj2_2 and Followed by proj2_3 etc. Note that the last file proj2_10 contains two lines, the first saying File proj2 10 and the second saying Not followed. (the first 9 files ought to be created in a single loop) 4. Then the script displays All regular files of PROJ2/proj2 and then displays just the names of all regular files in PROJ2/proj2 (note that non-regular files are not to be displayed, and since the 1s command displays ll entities in the directory, you cannot use ls for this purpose) 5. Then the script displays Contents and then it displays contents of all regular files in PROJ2/proj2 separated by a 6. Then it moves all files among proj2_1, ..., proj2_10 containing a character 4 or a character or 5 or a character 8 7. Then the script displays All regular files of PROJ2 and then displays just the names of all regular files in 8. Then it creates a single file in PROJ2 named BIGFILE that contains all the lines from all the regular files in PROJ2 line consisting of dashes (character -) from PROJ2/proj2 to PROJ2 PROJ2 9. Then it removes all other regular files from PROJ2 except BIGFILE

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

1.The difference between climate and weather?

Answered: 1 week ago

Question

1. What is Fog ?

Answered: 1 week ago

Question

How water vapour forms ?

Answered: 1 week ago

Question

What is Entrepreneur?

Answered: 1 week ago

Question

Which period is known as the chalolithic age ?

Answered: 1 week ago