This assignment deals with UNIX shell programming. The `lastcomm` command shows the last commands executed in reverse order (man lastcomm).
This script lists the commands that have been executed most often s1.sh .
This script lists the commands that executed longer than time `t`. s2.sh
Download the scripts and study them.
Assignment:
The input for this assignment is the output of the `ls` command. It consists of three parts of increasing difficulty. Write UNIX shell scripts to perform the following functions.
- Given the output of `ls -l`, list the attributes of the files which are larger than `n` bytes in size. `n` is passed as a command line argument.
- List the attributes of the files with size s, such that n1 < s < n2, sorted in descending order. n1, n2 are passed as command line arguments.
- List the attributes of the files with timestamp t, such that t1 < t < t2. t1, t2 are passed as command line arguments. You may ignore the `date` field.