Bourne/C shell help

Exercise Five
Write a Bourne shell script which:
� Professionalism: plan for this from the start.
� Has one command line argument.
� If the command line argument is a directory then the script should output the number of
files in the directory.
� If the command line argument is an ordinary file then the script should output whether
or not the file has execute permission for the file owner.
� If the command line argument is neither a file or directory then the script should output
an appropriate error message.
� If no command line argument is supplied then the script should output an appropriate
error message.

Use the results of Exercise Five to translate your Bourne shell script into a professional csh
script. Don't forget to conduct the same tests for this C-shell script as for the sh version.
Create a document that shows the development of your solution.
(Approx 2-3 pages of text, more if images are included).
That is, show how you can re-use the design and code from Exercise Five in the solution.
Make certain that you show this as a Code Re-use example, and hence it must show the
translation steps in going from the Shell code (designed and tested) to the C-shell equivalent.

Please read and obey the forum rules about home and coursework.

1 Like

You know, I might sound old here, but in my day we actually talked about exercises with our colleagues, like this guy. Maybe then it wouldn't take you until the last possible minute, leaving you with a desperate, completely unprofessional cry for help.