I want to capture the output of plantuml.jar running, to for example save it, reformat it (indent, etc) or similar. So, I want to:
* run java -jar plantuml.jar -v [etc...] and capture the output in a shell variable, for instance. It should not be printed to the console.
But I cannot get it to behave nicely as other commandline tools ;-)
In bash, this works for most all commands you can think of:
foo=$(cat test.txt); echo "Need to write this first..."; echo $foo
So, I want this to work:
foo=$(java -jar ./plantuml.jar -v -tpng -charset UTF-8 -o ./testimage.png ./src/nkp/test.puml); echo "Not yet"; sleep 1; echo $foo
But it does not.
Any errors i am doing? Solutions? Workarounds?