Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell script which: 1. accepts a file name 2. checks if file exists 3. if file exists, copy the file to the

Write a shell script which: 1. accepts a file name 2. checks if file exists 3. if file exists, copy the file

Write a shell script which: 1. accepts a file name 2. checks if file exists 3. if file exists, copy the file to the same name + .bak + the current date (if the backup file already exists ask if you want to replace it). 4. ask the user if she/he want to backup another file When done you should have the original file and one with a .bak at the end. What to submit? Upload your code and the following screenshots: 1. What happens when the file name does not exist? 2. What happens when the file exists and user wants to backup the file, and a previous backup file does not exist? 3. What happens when the file exists and a previous backup exists?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here is a shell script that performs the tasks described bash binbash Function to check if user want... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions