Program 1: Write a C program that makes systems calls to produce a program, called countfd, which determines and returns the number of file descriptions a process can have open at anytime.
Program 2: Write a C program that makes systems calls to produce a program called count_file_chars. This program takes a file, file_name, and a character, c, and returns the number of occurrences of the character c in the file. Extend this program so it takes an additional argument, -u, to count the number of occurrences of c independent of its case; that is you are to determine the number of occurrences of upper case c plus the number of occurrences of lower case c.
Program 3: Using the KSH, write a shell script called display_by_length, which takes an absolute pathname to a directory and displays all ordinary files in the directory ordered by their length; for each file listed, display the name of the file and its length - nothing else. Extend this script to take an option, -l, which if set has the program return all files longer than l, again for each file listed, dispalythe name of the file and its length.
Program 4: For this program, you are asked to extend the KSH script, junk, on pg. 249-251 of the Glass UNIX book. Your script should take an additional option indicated by -d for which the script moves only ordinary files to .junk.
Program 5: Glass Book, Chapter 6, 6.2.
Program 6: Write a KSH script called cleanse which displays the name of each file in a given directory and allows the user to interactively decide whether or not to keep or delete the specific file.