Question: 1 . Special parameters: $@ and $ * The special parameter $@ is referenced twice in the out script (
Special parameters: $@ and $
The special parameter $@ is referenced twice in the out script p in the text
Explain what would be different if the parameter $ were used in its place.
$ cat out
if $# eq
then
echo Usage: outv filenames"" &
exit
fi
if $v
then
shift
exec less $@
else
exec cat $@
fi
Write a script lab that tells you whether the permissions for two files, whose names are given as arguments to the script, are identical.
If the permissions for the two files are identical, output the common permission field.
Otherwise, output each filename followed by its permission field.
Hint: Start by identifying the command that will return the permissions for a given file, then make a pipeline which takes the output of that command,
and uses awk or the the cut utility or some other method to isolate just the permissions string.
Then, in your script, use that pipeline to trap that output into two separate variables or each of the files passed as arguments.
Then implement a comparison between the two variables.
Your script should look for two filename arguments when it is called and exit with a message if
a there are not two arguments and
b either of the files do not exist
Paste your completed script below:
Paste below the output of a comparison of both cases: two files where permissions match, and two files where they do not:
Write a Bourne shell script lab that takes the side of a cube as a command line argument and displays the volume of the cube.
Paste your script and two sample executions below:
you may pick values for the side XX of the cube.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
