help with basic shell scripting A given UNIX directory may contain many files an
ID: 2965349 • Letter: H
Question
help with basic shell scripting
A given UNIX directory may contain many files and subdirectories. For the purpose of this
assignment, a "file" is a nondirectory file, and a directory is a subdirectory of the given directory.
Each file or directory might have different permissions. For example, a file might have read and
execute permissions for the owner. A directory might have only read permission.
The directory is to be specified as a single command line argument to your script. You do not
need to account for any contents of nested subdirectories
Explanation / Answer
and
Some Hints
For this script, here are some shell scripting features you will likely need. We will be sure to cover the last three of these (for, command substitution, and expr) in lecture class on Nov 22 (and Nov 29, if needed)
Sample Runs
Note that this last run is based on a directory with these contents:
Submitting
Make sure you are logged into shell.cs.fsu.edu and the file you want to submit is stored in your current working directory. To submit, type the following command:
where the name of your shell script is the filename. This should be:
This will run a script and a C++ program that copies your file into a submission directory. The program will also give you feedback at the end -- it will display the contents of the file you just submitted to standard output. This will allow you to check to make sure that what you submitted was correct.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.