Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

previous script: if [ $# -eq 0 ]; then echo Usage: mycat2.sh FILE ... Description: concatenates FILE(s) to standard output. exit 1 else while

image text in transcribed

previous script:

if [ $# -eq 0 ]; then echo "Usage: mycat2.sh FILE ... Description: concatenates FILE(s) to standard output. "

exit 1 else

while [ $# -ne 0 ]

do cat $1>>output.txt shift

done cat output.txt rm -rf output.txt fi

Let's add a new capability to your script in the previous task. Write shell script mycat3.sh based on your previous script such that it now supports the following three options: converts inputs to uppercase. For example, "This is a test" becomes "THIS IS A TEST" 1 converts inputs to lowercase. For example, "This is a test" becomes "this is a test. t converts inputs to initial caps. For example, "This is a test" becomes "This Is A Test" The syntax of your new command should be as follows: Usage: mycat3 [-u-1-t] FILE In other words, only one of the above options can be provided. Moreover, your script should behave as in the previous task if no option is provided. In case of an error, appropriate error message needs to be sent to stderr. Update your help message to reflect the new options, test mycat3.sh extensively, and include it in your repository. Let's add a new capability to your script in the previous task. Write shell script mycat3.sh based on your previous script such that it now supports the following three options: converts inputs to uppercase. For example, "This is a test" becomes "THIS IS A TEST" 1 converts inputs to lowercase. For example, "This is a test" becomes "this is a test. t converts inputs to initial caps. For example, "This is a test" becomes "This Is A Test" The syntax of your new command should be as follows: Usage: mycat3 [-u-1-t] FILE In other words, only one of the above options can be provided. Moreover, your script should behave as in the previous task if no option is provided. In case of an error, appropriate error message needs to be sent to stderr. Update your help message to reflect the new options, test mycat3.sh extensively, and include it in your repository

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions