#!/bin/bash echo "the command you executed was: $0" echo "the first positional parameter was: $1" echo "the second posit

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

Bin Bash Echo The Command You Executed Was 0 Echo The First Positional Parameter Was 1 Echo The Second Posit 1
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 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply