Question: Write a bash script called example3.sh that will print information about the files in the current directory based on the command line arguments (or lack
Write a bash script called example3.sh that will print information about the files in the current directory based on the command line arguments (or lack thereof). The syntax is as follows: example3.sh [file1] [file2] [fileN] If no arguments are given, your program will default to all non-hidden files in your current directory. Your program will report the following statistics: The number of ordinary, readable, and executable files in your current directory. The number of non-existent (if files specified in command line arguments do not exist) or other types of files in your current directory. The number of directories in your current directory. The number of ordinary and readable files in your current directory. The total number of bytes (size) contained in ordinary and readable files in your current directory. Please note that no duplication of file counts is allowed (e.g., directories are counted as directories only, but not executable files even though they are executable, since they are not ordinary files). Also, only count data from the current directory and not sub-directories (i.e., files inside directories in the current directories.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
