- Bin Bash Echo The Command You Executed Was 0 Echo The First Positional Parameter Was 1 Echo The Second Posit 1 (35.46 KiB) Viewed 40 times
#!/bin/bash echo "the command you executed was: $0" echo "the first positional parameter was: $1" echo "the second posit
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
#!/bin/bash echo "the command you executed was: $0" echo "the first positional parameter was: $1" echo "the second posit
#!/bin/bash echo "the command you executed was: $0" echo "the first positional parameter was: $1" echo "the second positional parameter was: $2" echo "the third positional parameter was: $3", echo "the fourth positional parameter was: $4" echo "the total number of positional parameters was: $#" echo "the process id of this script is $$" myparameters=$* echo "content of myparameters: $myparameters" #the $a variable represents a set of strings consisting of your command parameter # the for loop will loop through all you parameters and echo it to the screen for i in $a do done #$* represent all positional parameter as #a string. It is being saved in the varia #myparameters echo $i Run this program by providing the expected command line arguments Show in a video: a. Program b. Execution of the program c. Thorough explanation of the functionality embedded within this program