I'm using Apache CLI to parse command line arguments. One of my arguments is a filter that takes a string MyApp -f "search for this string"
I thought when i do cmdLine.getOptionValue("f")
it would return: search for this string
However it just returns search
What should I do to ensure that the entire string is retrieved, apparently just wrapping it in double quotes doesn't seem to work.
I'm on ubuntu.
I think passing the string with extra single quotes should work:
MyApp -f "'search for this string'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With