Question: 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:](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66e046e05068e_23966e046dfb6b4d.jpg)
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
Get step-by-step solutions from verified subject matter experts
