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
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