CSC 271-Software I : Utilities and Internals
Dr. R. M. Siegfried
Assignment #10 - Working with bash
Due Monday, November 6, 2017
- Write a shell script (executable command file) that displays the names of
all the command-line parameters (it assumes that they are all files) and then
gives their directory listing.
Use ls -ld
to ensure that you get the
complete listing and that you get it for the directory and not
the files in the directory.
- The Linux command last lists users in reverse chronological order. Use
this together with sort, sed and uniq to get a listing of all the users who
have been on the system since the log was last cleared. (Hint: use sed to
get rid of everything on the line other than the login name).
- The
ls
command will list the so-called
"hidden" files if you use the -a
. So,
for example, ls -la $HOME
will list
all the files in your home directory, including the hiddent files,
whose names all begin with a period .
Use this together with the filters that we have learned to get a listing
that includes the names of ONLY the hidden files in a directory
given as an command-line parameter.
After you get your programs runnings, copy and paste the source code into Notepad as well as the results of a run and hand in hardcopy.
[Back to the Assignment List]