Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question below In this exercise, you will create a script called flle ops.sh that uses the various file operators The file_ops.sh script will Use one

Question below

image text in transcribed

In this exercise, you will create a script called flle ops.sh that uses the various file operators The file_ops.sh script will Use one command line argument Use four IF THEN statement to compare the first command line argument Determine which file operators to use that produces the following output when the script run with the arguments shown WARNING: In the IF THEN statements, to avoid syntax error messages, there must be a space before and after each bracket and also between each element within the brackets. Watching the video about File Test Operators may be helpful Look at the slide "File Operators The first IF THEN statement has the form If [operator $1] then echo "" Decide which operator to use that produces the message.... exists and is a directory Type the following commands. NOTE: You do not need to use 'gedit' to create your shell script. You can use 'vl' or 'nano' if you prefer Ignore anything highlighted in red as they are just comments 'clear' // Clear the screen 'cd /scripting_lab' // Change to the lab directory using tilde gedit file_ops.sh' // create the script using the editor of choice 'cat -n file_ops.sh' // show the script contents // You will run flle ops.sh four times without changes to the script 'sh file_ops.sh /etc/passwd' // file exists 'sh file_ops.sh /etc/passwdd' // file does not exist sh file_ops.sh /etc' // directory 'sh file_ops.sh /etcc' // directory does not exist 'date' Using Snipping Tool, take a screenshot

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

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

=+ Plan. What kind of information should this new section include?

Answered: 1 week ago

Question

How autonomous should the target be left after the merger deal?

Answered: 1 week ago