I'm using a command line program whose documentation states:
"You can run XXX on input located in another directory, but its output will always be put in the current working directory". I'd like to have the output written to another directory though.
I could (either with
- change to the output directory
- run the command so the output is put there
- then change back
- run the command in my current location
- move the output to the output folder
...but both seem clunky, and prone to errors if the script were to be edited by someone who isn't aware of this requirement. The only other solution I can think of is to join the commands with semicolons. Is there another way?
This is in bash by the way.