Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help to get output of these two question please. I need step by step solution with output please.(Unix) 9. Write a script that tests

Need help to get output of these two question please. I need step by step solution with output please.(Unix)

image text in transcribed

9. Write a script that tests for at least 1 or more arguments in the line calling the script. If there are 0 arguments (use positional parameters), then notify user ofthe problem and exit status 1. Ifuser puts in an argument, echo program running" and exit with a status of0. 10. Write a shell script that copies the file named by its first argument (it must already exist) to a file with the same name with the filename extension of.bak. Thus, ifyou call the script with the argument first (and a file named first exists in the working directory), after the script runs you would have two files: first and first.bak Next, add a test routine to verify the user has used an argument that is a valid file andnot a directory. Ifit ot then quit the script with an 'exit 1

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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions