Write a shell script based off of the following directions: 1. Greet the user. 2. Delete the entire directory called "fife". 3. Print the list of the directories and files (in long format) for your user home folder and list all files and directories, 1 per line.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
**Shell Script Instructions:**

1. **Greet the user.**
2. **Delete directory named "fifo".**
3. **List directories and files** in your home folder (one per line).
4. **Print current directory** using `pwd`.
5. **Create blank file:** `fifo.txt` in home directory.
6. **Create directory:** `fifo` in home directory.
7. **Setup directories:** 
   - Structure: `fifo/tmp/fifosys/program`
8. **Copy `fifo.txt`** to `fifo` folder.
9. **Create `testing.txt`** in `tmp` and `testsys.c` in `program` directory.
   - List directories to confirm creation.
10. **Navigate to:** `fifo/tmp/fifosys/program` directory.
11. **Print current directory** using `pwd`.
12. **User input:** Enter two letters stored in variables `x` and `y`.
13. **Save input:** Write variables to `2letters.txt` in `fifosys` directory.
14. **Display contents** of `2letters.txt`.
15. **Check inequality:** Compare input letters, display result.
16. **Make directory:** `tar` in home directory.
17. **Create tarball:** Archive `fifo` directory as `fifo.tar`.
18. **Move tarball** to `tar` directory.
19. **Delete `fifo` directory.**
20. **Print directory list** in home folder.
Transcribed Image Text:**Shell Script Instructions:** 1. **Greet the user.** 2. **Delete directory named "fifo".** 3. **List directories and files** in your home folder (one per line). 4. **Print current directory** using `pwd`. 5. **Create blank file:** `fifo.txt` in home directory. 6. **Create directory:** `fifo` in home directory. 7. **Setup directories:** - Structure: `fifo/tmp/fifosys/program` 8. **Copy `fifo.txt`** to `fifo` folder. 9. **Create `testing.txt`** in `tmp` and `testsys.c` in `program` directory. - List directories to confirm creation. 10. **Navigate to:** `fifo/tmp/fifosys/program` directory. 11. **Print current directory** using `pwd`. 12. **User input:** Enter two letters stored in variables `x` and `y`. 13. **Save input:** Write variables to `2letters.txt` in `fifosys` directory. 14. **Display contents** of `2letters.txt`. 15. **Check inequality:** Compare input letters, display result. 16. **Make directory:** `tar` in home directory. 17. **Create tarball:** Archive `fifo` directory as `fifo.tar`. 18. **Move tarball** to `tar` directory. 19. **Delete `fifo` directory.** 20. **Print directory list** in home folder.
Expert Solution
Step 1

Objective: Here, we need to write certain shell script commands to achieve the listed functionalities.

Language: Unix Shell Programming

 

 

 

 

 

 

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education