1. Write a script that asking for a filename using read command. If the file exist, list number of words and number of line of text in the file.
2. Modify the above script so that the filename is given as parameter. (for example the script can be run as “countwordnline myfile”)
3. Write a script that lists the number of ordinary files and directories for a given directory. Do this in two ways:-
a. Use the first letter of the output of ls –l to determine a file’s type.
b. Use the file type condition tests to determine a file’s type.
4. Write a script that takes the name of a directory as an augment and searches the file hierarchy rooted at that directory for zero-length files. Write the names of all zero-length files to standard output. If there is no option on the command line, have the script delete the file after displaying its name, asking the user for confirmation, and receiving positive confirmation. A –f (force) option on the command line indicates that the script should display the filename but not ask for confirmation before deleting the file.