Question: linux coding Write a Bash shell script named info.sh . The command for execution must include two command-line parameters: the name of the file that

linux coding

Write a Bash shell script named info.sh. The command for execution must include two command-line parameters: the name of the file that will be displayed and the name of the directory the listing of which you want to obtain. The output of this script must contain the following information:

The name of your script;

Usage message (what should be typed to execute your file);

Current date and time;

The name of the user;

The name of current working directory;

The name of UNIX machine;

The name of login shell;

Contents of the required file;

Listing of the required directory;

Total number of parameters of the script;

Calendar for October of the current year;

Disk usage;

Current number of users in the system;

Current time.

Important:

1) make sure that in the beginning of your script you include information about a shell that will execute your script and the usage line;

2) check the number of parameters and their types in the beginning of the script; if requirements are not met exit with a non-zero status;

3) each portion of the output must be preceded with some clarifying information;

4) use manual pages to study commands that you will need in your script and that were not discussed in the class (possibly, du, cut, date with specific options).

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!