Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Create a shell script that accepts a single command line argument representing a file () name and creates a backup of the gi tory

image text in transcribed
3. Create a shell script that accepts a single command line argument representing a file () name and creates a backup of the gi tory as the original file with th name of the original file and (date] is the current date in the form YYYY-MM-DD. The basename and dirname commands can be used to obtain a file name and a path, respec- tively. Read the man page for the date command to see how to obtain the desired date ven Ble. The back up should be in the same direc- e name Idate].tt1lename], where ttilename] is the string. Name your script (usernane] backup 1ab10. sh replacing tusername] with your username (i.e., jagraves21 backuplab10.sh) Your completed script should have the following behavior s . /jagraves21-backup-lab10. sh error no file provided s./jagraves21_backup_ lab10.sh /tmp/words.txt error /tmp/words. txt: no such file S touch tmp/words. txt s/jagraves21_ backup_lab10.sh tmp/words.txt S Is /tmp/ 2017-04-03_words. txt words.txt s /jagraves21_backup_lab10.sh jagraves21_backup_lab10.sh S 1s 2017-11-06_jagraves21_backup_lab10.sh jagraves21_backup_lab10.sh

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions