It would be great to have -o "none" option, that doesn't print anything from the command.
I'm scripting az login and don't want it to print the subs after login.
Here's a hack I came up with:
az login --query "[?n]|[0]"
You could also pipe your output to null.
@tjprescott - do you know of a good safe cross-plat way to do that?
I have just got in this issue creating storage accounts. There is a lot of output that pollute my scripts. Of source I can pipe the output or use the query, but it is so common to have a flag to silence a cli, and it is more readable and portable.
This should be a common option to all az cli commands. I think either
--quite flag--verbose flag accept a verbosity level.We have added option --only-show-errors in #12604 to disable warnings that are written to stderr. It will be included in S167 release.
Most helpful comment
I have just got in this issue creating storage accounts. There is a lot of output that pollute my scripts. Of source I can pipe the output or use the query, but it is so common to have a flag to silence a cli, and it is more readable and portable.
This should be a common option to all
az clicommands. I think either--quiteflag--verboseflag accept a verbosity level.