how can I pass multiple values from command line arguments
example
script.sh -arg1 op1 -arg2 op1 op2 op3
how can I pass multiple values from command line arguments
example
script.sh -arg1 op1 -arg2 op1 op2 op3
The shell will invoke script.sh
with the six operands ( -arg1
, op1
, -arg2
, op1
again, op2
, and op3
) as long as script.sh
is an executable file. What script.sh
does with those operands depends on what is in that file and what command interpreter is being used to process that file.
What shell are you using?
What system are you using?
What do you want script.sh
to do?
What are the contents of script.sh
?
Learn about getopts.