Answered step by step
Verified Expert Solution
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
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 repositoryStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started