I am using getopts and for the options I want to accept just one type of letter but it can be passed multiple times. Can't figure out how to do this b ...
I am using getopts and for the options I want to accept just one type of letter but it can be passed multiple times. Can't figure out how to do this b ...
Just got started with using getops, so this one is most likely a rookie error. I want to pass 2 options for the user to define; -e (env) and -p (proj ...
I have this simple bash script and when I call it with ./script.sh -d -a for example I would like to get "d a" returned. Problem is I only get "d" ...
I noticed that my script was ignoring my positional arguments in old terminal tabs, but working on recently created ones, so I decided to reduce it to ...
I am trying to read the arguments provided to a bash shell script like: Below is my code: However, this is the result I am getting: I was exp ...
What is the meaning of the following template in getopts? while getopts ':x:y-:' val; I know that it expects two options -x or -y but what is the m ...
I have the following bash script: When it runs, I want it to take all the required input opts and make an API call to my AWS account (to create a n ...
Hi all usually I would not need to ask around this simple task- however, stuck here and can't figure out what is going wrong. Since I spent quite a ...
Trying to read my flag and their arguments, I came accros a case where passing a flag with an expected argument, fallowed by another flag instead of t ...
following some examples from https://www.programcreek.com/python/example/121/getopt.getopt where they make option comparisons with == i.e (option == " ...
I'm using a script in Jamf which uses positional arguments, but I need to use getopts to parse the various arguments only from #4. Positions 1-3 are ...
Here's a toy example that shows what I mean: problem is that getopts isn't particularly smart when it comes to arguments. for example, ./myscript.s ...
How can I able to read the flags after the positional arguments. Not able to get the flag. But if i place the flag argument before the positional t ...
Hello i trying to do a project from school, but i have a little problem, when i try to execute the function via getopts i don't get any result, im stu ...
I am looking to get multiple values from same argument using getopts. I want to use this script to ssh and run commands on a list of hosts provided th ...
I want getopts to recognize when a user passes "-?" and "-h" and send to my help function. I also don't want getopts to send the user to the help func ...
I am working on a Bash script that needs to take zero to multiple strings as an input but I am unsure how to do this because of the lack of a flag bef ...
I am trying to write a function that has optional arguments in a way such that the optional arguments are follow by something like -x, for example ...
Here is the code, I want to run this command Getting the test.log input, then convert it to text type, then store it on the output.txt file ./small.s ...
I have a code that I wrap with a bash script, and I want to know if a certain flag was given (-b), and if so, to update some variable I have in the sc ...