Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

Students also viewed these Databases questions