Answer the question
In order to leave comments, you need to log in
How to accept --key=value in BASH script?
I’ll make a reservation right away, I’m not particularly friendly with bash. But I just can't figure out what words to look for the solution of the problem:
to accept in the script --key=value
What is this? Array, parameter, option?
Answer the question
In order to leave comments, you need to log in
--key=value
this is the general principle how to pass long options with parameters.
Either you parse $1 inside the script, or you can try to read how to use getopts (not to be confused with getopt)
But it's easier to parse $1 by splitting it into two parts with the samecut -d "=" -f 2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question