I need help to get the output of these two questions please. I need step by step
ID: 3607548 • Letter: I
Question
I need help to get the output of these two questions please. I need step by step solution with output please. (Unix)
Thank you!
10. Write a script named all.sh that displays (sends to standard output): 1. 2. 3. the name of the calling program, the number ofpositional parameters, and a list of positional parameters. Include the #! Line and a comment Remember to make the file executable. Test the script with 0, 1, and 5 positional parameters. 12. Make a symbolic link named linkto to the all.sh script you script report as the name it was called as?Explanation / Answer
Hi I have written shell script for both points. Please check below.
all.sh
#!/bin/sh
# prints the calling proram name
echo "calling program name "$0;
echo "Number of positional parameters:"$#; # Prints the no of parameters
echo "Parameters ares: "$@;
Output:
./all.sh 1 2
calling program name ./all.sh
Number of positional parameters:2
Parameters ares: 1 2
-----------------
Another program:
links.sh
#!/bin/sh
# Links to all.sh
ln -s all.sh linkto.sh
./linto.sh 1
Output:
calling program name ./all.sh
Number of positional parameters:1
Parameters ares: 1
Please chek it and let me know any querries.
Thank you. All the best.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.