Creating a Bourne Shell

Submitted by: Submitted by

Views: 128

Words: 472

Pages: 2

Category: Science and Technology

Date Submitted: 12/01/2014 07:24 PM

Report This Essay

Phase 5 Individual Project

Keara Cole

CS126-1404A-01: Unix Fundamentals

November 10, 2014

Instructor: Lawrence Todd Meadors

Create a Bourne shell script. The script should do the following:

1. Explain what the script will do and who is the author in a comment area.

2. cd to your home directory

3. Show your current working directory.

4. List the contents of the current directory.

5. Create the directory structure and create the files as defined in the previous Individual Project.

6. For each directory and file, test to see if the file or directory already exists; if it does exist, do not recreate; if it is missing, create it.

7. In the end, generate a directory listing showing the structure and content of the new directories.

8. At the beginning of the script, set a variable called INSTALL_DIRECTORY that will contain the location of the directory into which the Web server will be installed. At the end of the script, display the contents of this variable along with a message to the installer about the location in which the directories were created.

A small hint for creating the content of the httpd.conf file: use the echo command in your script. The script is not interactive and should create all objects automatically. Also, the ServerRoot and DocumentRoot should contain correct values based on your directory names.

If you need to test that directories are created or not based on them already existing, remove files and directories ahead of time to ensure you know the exact state of your environment.

Listed below I copied and pasted the Bourne shell script. I did a lot a research but I still ran into a few problems, I hope this is right.

Last login: Mon Nov 10 21:56:10 on ttys000

Keys-MacBook-Pro:~ macbookpro$ touch apache/bin/httpd - 755

touch: apache/bin/httpd: No such file or directory

Keys-MacBook-Pro:~ macbookpro$ touch www/html/index.html - 644

touch: www/html/index.html: No such file or directory

Keys-MacBook-Pro:~...