Question: (Linux) 1. Write shell scripts to solve the following problems: a. Extend the shell script written for lab 33 to display an appropriate error and
(Linux)
1. Write shell scripts to solve the following problems:
a. Extend the shell script written for lab 33 to display an appropriate error and terminate the script if a command line argument is not provided.
shell script for lab33:
echo "Please enter lab number" read xx script ~/bin/lab$xx.out a2ps -A fill -C -E -g -o - ~/bin/ci132-lab$xx-q??.sh ~/bin/lab$xx.out | ps2pdf - /opt/ci132/submit/ci132-lab$xx-username.pdf
b. Extend the previous shell script to also ensure the command line argument is an integer and shell scripts exist matching the file naming convention for these assignments. Display an appropriate error and terminate the shell script if either condition is not met.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
