Bourne/C shell help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bourne/C shell help
# 1  
Old 08-31-2011
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.

Last edited by pludi; 08-31-2011 at 07:58 AM.. Reason: Removed email
# 2  
Old 08-31-2011
Please read and obey the forum rules about home and coursework.
This User Gave Thanks to cero For This Post:
# 3  
Old 08-31-2011
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

'Shell Shock' vulnerability in Bourne shell

A severe vulnerability was discovered in Bourne shell. Just google for: bash vulnerability ... for more details. (5 Replies)
Discussion started by: Cochise
5 Replies

2. UNIX for Dummies Questions & Answers

Bourne shell tutorial

hey guys, what is prolly the best way to learn bourne shell programming the easy way? I found many tutorials but I just cant seem to decide / chose which one is the best and suits my needs. could you recommend me some tutos? thanks (1 Reply)
Discussion started by: genius90
1 Replies

3. Shell Programming and Scripting

Bourne shell & Korn shell

Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command .. $ echo $SHELL yields me /bin/sh Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies

4. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

5. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

6. Shell Programming and Scripting

Need Bourne shell tutorial

Hello. I need a good & complete Bourne shell tutorial. Please, can anyone help me to find it? Thanks. (1 Reply)
Discussion started by: jag
1 Replies

7. UNIX for Dummies Questions & Answers

Bourne-again shell

Hi guys !! well i'm still new in learning UNIX , and actually i'm still studying it by myself .. anyway, some people told me the Bourne-again shell is a good version of UNIX to work on , and i tried to download yesterday but i didn't know how to start it ...... the ReadMe file associated with... (3 Replies)
Discussion started by: mrsamer
3 Replies

8. Shell Programming and Scripting

cd from a Bourne Shell Script - Please Help

Dear Bourne Shell Expert, I am trying to change the current working directory from within a Bourne Shell script. Simply enough i thought ! As I am sure you are well aware, Inside the script i echo `pwd` and it seems ok, but the shell spawns another shell to execute this and as such, when my... (10 Replies)
Discussion started by: fawqati
10 Replies

9. Shell Programming and Scripting

bourne shell not working

This code has worked for years and still does in my production environment. But it's failing in my development environment now. The cd works but the creation of node1, jnum, and node2 fails. Oddly the output shows a line from from the awk script at the end of the code during the setting of each... (6 Replies)
Discussion started by: gillbates
6 Replies

10. Shell Programming and Scripting

Bourne Shell Scripting

Hi, I'm having trouble with some UNIX Bourne shell scripting that I am doing for an assignment. I am trying to sort a comma delimited file into a sort of format that will print out nicely in a telnet terminal window. I'm having a bit of trouble because all I seem to be getting is garble. ... (3 Replies)
Discussion started by: Slamo
3 Replies
Login or Register to Ask a Question

Featured Tech Videos