Question: Part 2 Requirements: Write a script that will determine which file in a directory has the maximum number of lines (this may be different than

 Part 2 Requirements: Write a script that will determine which file

Part 2 Requirements: Write a script that will determine which file in a directory has the maximum number of lines (this may be different than the file that has the maximum number of bytes). After determining the file with the maximum number of lines, the script will print out the name of the file and the number of lines. The script should only focus on files and ignore sub directories. Research the w" command options under the manual online documentation .The maxlines sh script is designed to handle zero (0) or one (1) argument(s). o If zero arguments are specified, the script by default will examine the files in the current directory If one argument is specified, the argument must be a valid directory name The script will then examine the files in the specified directory o The script should be able to handle the following error conditions: . More than 1 argument is specified o The specified argument is not a directory o The script file name must be: maxlines.sh

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!