Is there any reason that messages like this:
ERROR: orgUnitPath is not a valid argument for "gam print users"
.. and many others, are printed to stdout? I know that gam isn't just a unix/linux program, but standard behaviour is to print results to stdout, errors to stderr. This is very much expected behaviour, and allows scripts which do something like this:
if gam some command >results 2>errors; then
(echo 'Command succeed. Results below'; cat results) | Mail -s 'Overnight gam command' administrator
else
Mail -s 'Overnight gam failed' support <errors
fi
Right now, I am simply regularly surprised when these errors pop up on an unexpected output channel (stdout.)