![]() | ![]() | ![]() | 4.9 Shell script -- dir |
cut,
ls, expr, grep, paste, wc, cat,
hostname, and cal. It will probably
also use pipes, redirection, variables, and command substitution.
Your program should do the following:
September 1996 has 30 days
The root directory on gort has 12 directories
ls -l / command gives:
This is what I would like your output to look like:drwxr-xr-x 2 root 2048 Jun 30 14:26 bin drwxr-xr-x 2 root 512 Jun 2 15:59 bsd-src -rw-r--r-- 1 root 147456 Sep 7 14:25 core -rw-r--r-- 1 root 925 Apr 8 18:00 dflt.DECterm drwxr-xr-x 3 root 3072 Sep 8 14:45 dev drwxr-xr-x 6 root 6656 Sep 9 22:25 etc lrwxr-xr-x 1 root 7 Feb 24 1993 lib -> usr/lib drwxr-xr-x 2 root 8192 Feb 24 1992 lost+found drwxr-xr-x 2 root 512 Aug 7 1992 mnt drwxr-xr-x 2 root 512 Feb 24 1993 opr drwxr-xr-x 3 root 512 Aug 3 12:44 public lrwxr-xr-x 1 root 7 Feb 24 1993 sys -> usr/sys drwxrwxrwt 5 root 1024 Sep 12 18:46 tmp -rw-r--r-- 1 root 11568 Jul 24 1992 ultrixboot drwxr-xr-x 27 root 1024 Jun 10 11:28 usr drwxr-xr-x 9 root 512 Aug 19 15:43 usr2 -rwxr-xr-x 1 root 3448280 Feb 24 1993 vmunix
September 1993 has 30 days
The root directory on gort has 12 directories
2048 r-x 2 14:26 bin
512 r-x 2 15:59 bsd-src
3072 r-x 3 14:45 dev
6656 r-x 6 22:25 etc
8192 r-x 2 1992 lost+found
512 r-x 2 1992 mnt
512 r-x 2 1993 opr
512 r-x 3 12:44 public
1024 rwt 5 18:46 tmp
1024 r-x 27 11:28 usr
512 r-x 9 15:43 usr2
Place the lab in the instructor hand-in box in BUS R6E, the "terminal room".your name TABER CSC137 Lab 4.9: Shell script --- dir
![]() | ![]() | ![]() | 4.9 Shell script -- dir |