How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Mr. Gregory White Your Own Question

Mr. Gregory White
Mr. Gregory White, Professor
Category: Homework
Satisfied Customers: 5238
Experience:  M.A., M.S. Education / Educational Administration
46856550
Type Your Homework Question Here...
Mr. Gregory White is online now
A new question is answered every 9 seconds

Shell Programming Assignment 1 Submit: 1. a fully and

Customer Question

Shell Programming Assignment 1 Submit: 1. a fully and meaningfully commented version of your program 2. an uncommented plain text version. Notes: The commented program should be commented fully and meaningfully. Assignment Write an interactive script that
allows a user to copy an existing file from an existing directory to another named new directory. The script should ask the user for: ● the name of a source directory from which to copy a file, ● the name of the file to copy, and ● the name of a destination
directory to create and into which to place the copied file. The script should report errors (and abort the program) where: 1. no source directory name is given; 2. no source file name is given; 3. no destination directory name is given; 4. the source directory
name given does not name an existing directory; 5. the source file name given does not name an existing file; 6. the destination directory name given names an already existing directory; 7. the attempt to create the new directory fails; 8. the attempt to copy
the file fails. Examples Here’s how some example runs would look (assume the program is called 'ass1' and user input in bold): A successful run would look something like this (user input in bold): ass1 Please enter the name of the source directory: source
Please enter the name of the file to copy: myfile Please enter the name of the new destination directory: destdir ass1: File myfile from directory source has been copied to destdir. An unsuccessful run would look something like this (user input in bold): ass1
Please enter the name of the source directory: source Please enter the name of the file to copy: myfile Please enter the name of the new destination directory: ass1: ERROR: Destination directory not supplied. ass1: USAGE: Enter the name of a new directory
to create. Another unsuccessful run would look something like this (user input in bold): ass1 Please enter the name of the source directory: source Please enter the name of the file to copy: myfile Please enter the name of the new destination directory: source
ass1: ERROR: Destination directory already exists. ass1: USAGE: Enter the name of a new directory to create. Another unsuccessful run would look something like this (user input in bold): ass1 Please enter the name of the source directory: source Please enter
the name of the file to copy: fileMisnamed ass1: ERROR: File fileMisnamed does not exist. ass1: USAGE: Enter the name of an existing file. Notes: Errors should be echoed to the standard error channel and adhere to the standard syntax shown in the notes. For
example: echo "${0}: ERROR: Destination directory already exists." 1>&2 echo "${0}: USAGE: Enter the name of a new directory to create." 1>&2 exit 6 #exit with status error code 6 Which, in an example run would display on the error channel as: ass1: ERROR:
Destination directory already exists. ass1: USAGE: Enter the name of a new directory to create. All your exits for errors should be given a unique exit status number 1-255. Pseudocode for assignment 1: 1. Get name of source directory. 2. Check if name of source
directory is blank 3. If so exit with error message. 4. Check that source directory exists. 5. If not then exit with error. 6. Get name of source file. 7. Check if name of source file is blank 8. If so exit with error message. 9. Check that source file exists.
10. If not then exit with error. 11. Get name for destination directory. 12. Check if name of destination directory is blank. 13. If so exit with error message. 14. Check if name given for destination directory names an existing directory. 15. If so exit with
error message. 16. Try to create the destination directory. 17. If fail send error message and exit. 18. Try to copy source file from source directory to destination directory. 19. If fail send error message and exit. 20. If successful send confirmation message.
Submitted: 1 year ago.
Category: Homework
Expert:  Mr. Gregory White replied 1 year ago.

Hello, my name is Greg.

Is there any other information you can send to see if I can assist on it this for you? If you have any documents you can upload, you can do so to mediafire.com or box.com and share the link here with us.

If I had a model and could provide that as a model (would have to check files to see if I have one), would that be sufficient or are you seeking a fully written new model document?

Customer: replied 1 year ago.
Hello Greg,
I have attached a link and an example program of what the assignment should look like. I would require a fully written new model document please.https://citbb.blackboard.com/bbcswebdav/pid-288054-dt-content-rid-780734_1/xid-780734_1
Expert:  Mr. Gregory White replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.

Related Homework Questions