Question
1. Write a script named all.sh that displays (sends to standard output): the name of the calling program, the number of positional parameters, and a
1. Write a script named all.sh that displays (sends to standard output):
the name of the calling program,
the number of positional parameters,
and a list of positional parameters.
Include the #!line (Sobell, page 287) and a comment
Remember to make the file executable.
Test the script with 0, 1, and 5 positional parameters (arguments).
Copy and paste the script into a common text or doc file. Show output with 5 arguments.
For example:
echo "This script was called as
echo "This script was called with this many arguments
echo "The arguments were:
2. Make a symbolic link named linktoto the all.sh script you
wrote in the previous step. Make it executable. Call linkto with two arguments. What does the
script report as the name it was called as (The calling program)?
Show your commands and output (including the link you called)
Create a script called ifRead.sh
Script Requirements:
read two positional parameters from command line
Use if/fi statement and a test command to compare the two positional parameters.
If the two positional parameters match, then echo match
If the two positional parameters do not match, echo end of program
Run script and include two matching arguments, then try with not matching arguments.
Show content of your script and commands and output (for two matching arguments)
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