Question: (Linux) Use the following shell script to answer the questions: x=$1 script ~/bin/lab$x.out a2ps -A fill -C -E -g -o - ~/bin/ci132-lab$x-q??.sh ~/bin/lab$x.out | ps2pdf

(Linux)

Use the following shell script to answer the questions:

x=$1 script ~/bin/lab$x.out a2ps -A fill -C -E -g -o - ~/bin/ci132-lab$x-q??.sh ~/bin/lab$x.out | ps2pdf - /opt/ci132/submit/ci132-lab$x-username.pdf

a. Extend the shell script to display an appropriate error and terminate the script if a command line argument is not provided.

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 (ci152-labxx-qyy.sh (Where xx is the lab number and yy is the question number)). 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!