Question: Exercise 1 . 5 Scripting in Linux Objective: Learn how to automate a series of commands using a shell script. Write a shell script named
Exercise Scripting in Linux
Objective: Learn how to automate a series of commands using a shell script.
Write a shell script named "mysparser" that parses the files within a directory provided as input argument. The parser should print out the name of the directory to be parsed, the total number of files, and the name of the smallest and largest file within such a directory.
Your parser MUST do:
Print out the current date at which the script was executed
Print out the name of your Linux user
Print out your name and NJIT student ID
Display the name of the folder to be parsed
Print out the total number of files in the provided directory
Print out the name of the smallest and largest files in the provided directory
Your solution must include:
Your shell script file name "myparser"
A description of how you addressed every step
Explain how you run your script "myparser"
Example:
The output of running myparse given the directory eceSDN is:
Fri Jan :: PM EST
Current user : ece
Jorge Medina, ID:
parsing eceSDN
There are: files in eceSDN
The smallest file: dependencies
The largest file: ryuinstall
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
