Homework 1
First scripts.
1. Create e script named date_time, which would display a message
Today date is
2. Create e script named all_users, which would display a message
The number of users logged on the system is
Using read command
3. Create e script named read_myname, which would
a. display a message Please enter your name
b. then read your name being inputted by you
c. then displays the message Welcome to ASA !
4. Create e script named read_names, which would
a. display a message Please enter your first name
b. display a message Please enter your last name
c. then read your first and last names being inputted by you
d. then displays the message Welcome to ASA !
Homework 2.
Using an if construct
1. Create a script named test-files, which would
a. check a file, which is given as the first argument when the script runs
b. if this is a regular file, display the message This is a regular file
c. if this is not a regular file, display the message This is not a regular file
2. Create a script named test-files2, which would
a. check a file, which is given as the first argument when the script runs
b. if this is a regular file, display the message This is a regular file
c. if this is a directory, display the message This is a directory
d. if something else, display the message This is not regular file neither directory
Using an if construct inside of for loop
3. Create a script named test-files3, which would
a. check all files, which are given as the argument in the for loop
b. if this is a regular file, display the message This is a regular file
c. if this is not a regular file, display the message This is not a regular file
4. Create a script named test-files4, which would
a. check all files, which are given as the arguments to the for loop
b. if this is a regular file, display the message This is a regular file
c. if this is a directory, display the message This is a directory
d. if something else, display the message This is not regular file neither directory