Loading
Home › Computer Science Help › Write a script to backup a list of files in C shell Prepa...
Status: Completed

Write a script to backup a list of files in C shell Preparation: Create a file and type in the list of files (in your directory) that you want to backup. Create a directory in which you will store the backed-up files. Script Script Name: backup.txt Arguments: A filename and directory. The filename holds the list of the files that should be backed-up. The directory is where the backed-up files should be stored. Validation: The minimum validation requirements are: Ensure that exactly two arguments are entered. Check that the first argument is the name of a file that exists. Check that the second argument is the name of a directory that exists. Body Section: Create backup files for all the files listed in the first argument. The backup files should have the same name as the original file with the extension .bak. They should be copied to the directory given as the second argument. the backup MUST be done inside a loop. Also, the command (line) that copies the file needs to place the copy in the given directory and rename it to .bak. Testing the Script Test the script with no arguments Test the script with one argument. Test the script with three arguments. Test the script with two arguments the first not being the name of a file. Test the script with two arguments the second being the name of a file, not a directory. Test the script with the name of the file and directory that you created. Testing the Effect of the Script Check the contents of the directory to be sure the files were copied. Sample Script Header: #!/bin/csh #AUTHOR: your name #CLASS: CS2080.001 (or 002) #TASK: Short description #DATE DUE: date #DESCRIPTION: Reads files by line and Long description # #EXIT VALUES # 0 if successfully completed # 10 incorrect number of arguments # 20 one or more files does not exits # 30 .. Hand in Hard Copy Electronic copy on Black Board NOTES: Should never exit 0 in middle of code you should make it to the end of the script for exit 0. Nesting is probably not needed, the exit statements take care of that. Use standard C Shell. I do not want to see: while loops fi $1, $2 for argvs etc bash or ksh ifs with (( )) or [[ ]] or [ ]

Date Posted: 10/03/2016
Category: Computer Science
Due Date: 14/03/2016
Instruction
Write a script to backup a list of files in C shell Preparation: Create a file and type in the list of files (in your directory) that you want to backup. Create a directory in which you will store the backed-up files. Script Script Name: backup.txt Arguments: A filename and directory. The filename holds the list of the files that should be backed-up. The directory is where the backed-up files should be stored. Validation: The minimum validation requirements are: Ensure that exactly two arguments are entered. Check that the first argument is the name of a file that exists. Check that the second argument is the name of a directory that exists. Body Section: Create backup files for all the files listed in the first argument. The backup files should have the same name as the original file with the extension .bak. They should be copied to the directory given as the second argument. the backup MUST be done inside a loop. Also, the command (line) that copies the file needs to place the copy in the given directory and rename it to .bak. Testing the Script Test the script with no arguments Test the script with one argument. Test the script with three arguments. Test the script with two arguments the first not being the name of a file. Test the script with two arguments the second being the name of a file, not a directory. Test the script with the name of the file and directory that you created. Testing the Effect of the Script Check the contents of the directory to be sure the files were copied. Sample Script Header: #!/bin/csh #AUTHOR: your name #CLASS: CS2080.001 (or 002) #TASK: Short description #DATE DUE: date #DESCRIPTION: Reads files by line and Long description # #EXIT VALUES # 0 if successfully completed # 10 incorrect number of arguments # 20 one or more files does not exits # 30 .. Hand in Hard Copy Electronic copy on Black Board NOTES: Should never exit 0 in middle of code you should make it to the end of the script for exit 0. Nesting is probably not needed, the exit statements take care of that. Use standard C Shell. I do not want to see: while loops fi $1, $2 for argvs etc bash or ksh ifs with (( )) or [[ ]] or [ ]
Attached
No File uploaded yet.
Tutor Uploads
No File uploaded yet.
Bidders
ExcellentTutor 9 years, 12 months ago
Rated 9.09 earned 174531.76 around 5422 assignments.
I can complete this assignment for you........ thank you
$150.00
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 22:00 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
smasakari 9 years, 12 months ago
Rated 9.17 earned 25004.00 around 1007 assignments.
hello friend
$200.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
totur247 9 years, 12 months ago
Rated 8.65 earned 4571.00 around 166 assignments.
Hi, please consider my bid for your assignment and I guarantee that I will follow instruction accordingly so as to give you the best grade in time,free from plagiarism.. Thank you
$80.00
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 22:03 PM
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 22:03 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
lixwriter 9 years, 12 months ago
Rated 9.12 earned 2068.14 around 96 assignments.
i can guarantee you quality work, with 0% plagiarism, in time and as required having gone through your assignment ..thank you
$150.00
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 22:00 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
Kivondo 9 years, 12 months ago
Rated 8.68 earned 7104.00 around 257 assignments.
Hi, I can complete this assignment for you. I am research scholar currently doing my Masters. I believe in helping the scholars to the best of my efforts with sincerity. I deliver quality, well researched, and Non-Plagiarize work. I have adequate experience to solve your assignment within your time. Thanks in advance
$80.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
accountspro 9 years, 12 months ago
Rated 9.03 earned 41229.00 around 1104 assignments.
Hi, I can complete this assignment for you. I deliver quality, well researched and free plagiarized work. I guarantee excellent work. Thank you
$80.00
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 02:39 AM
  • I can pay a maximum of $50, can you do it for this amount ?
    User_8325 | Dec 03, 2016, 20:14 PM
  • hello
    User_3964 | Mar 13, 2016, 12:47 PM
  • hi, I assigned you for the HW, did you start working on it ?
    User_8325 | Mar 13, 2016, 19:39 PM
  • Hello, I'm sorry for the inconveniences. I hope I can make it up to you with another subject.
    User_3964 | Mar 14, 2016, 20:18 PM
  • dfgt
    User_3964 | Mar 27, 2017, 08:55 AM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
harvardtutor 9 years, 12 months ago
Rated 8.93 earned 38096.91 around 1156 assignments.
Hello, am, one of the company's top writers and I am interested in working on your paper. I will ensure the delivery of a high quality product within given deadline. I have worked on similar papers in the past and I can assure you of an A grade paper. I am an excellent and experienced academic writer. I have been writing academic papers thus essays, course works, thesis, term papers, dissertations, research proposals among others for the last 4 years. I write plagiarism free work that has good grammar that flows. In addition all my work is attainable long before deadline. Upon keenly going through the work you have posted, I acknowledge that it is to the best of my knowledge and that I can have it done professionally; free of plagiarism, free of any grammatical mistakes. THIS IS EVIDENT BECAUSE I ALSO PROVIDE MY CLIENTS WITH A PLAGIARISM REPORT OF THE WORK. Moreover, it is attainable long before the deadline. Kindly allow me to work on it and am so sure you will love using me each and every time.
$80.00
  • i'll assign you, did you read and understand the assignment thoroughly, that you know how to do it ??
    User_8325 | Dec 03, 2016, 22:01 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}