Plz Help Me in This question in Shell Programming

2- Write a bash shell script filestatic. The script should examine the number files in directories given as arguments (parameters) to this script.
a. if one argument is given, the script should count and report the number of files in this directory. Only regular files should be counted, not directories or subdirectories. Then the script should count and reports the number of bytes consumed by the files in this directory.
b. If tow arguments are given, the script should compare these two directories, and reports which directory contains more files. Only regular files should be counted, not directories or subdirectories..

  • Output format and error handling should be analogous to that for the previous script (larger).
  • Show the output of your script filestatic on the /etc directory of your Linux system. And Show the output filestatic /etc /tmp on your Linux system.

When you clicked "New Thread", you would have seen something like:

Sorry, but it's not optional. If you want help in the homework forum, you need to complete this template. Thanks.

1 Like