In Java, how do I execute a linux program with options, like this:
ls -a (the option is -a),
ls -a
and another: ./myscript name=john age=2
./myscript name=john age=2
Apache Commons has a library built to handle this type of thing. I wish I knew about it before I coded something like this by hand. I found it later on. It takes options in various formats for a command line program.
Apache Commons CLI