maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
227 stars 24 forks source link

Suppress error messages #97

Closed tarnh closed 4 years ago

tarnh commented 4 years ago

Dear Max,

I'm using wd id $article_string since severals years in my scripts. Thank you very much for your tool!

As far as I remember just a few version ago there were no error messages like Error: id not found.

How may I suppress any error message from wikibase-cli for usage with bash one-liner scripts?

maxlath commented 4 years ago

you could ignore errors "the shell way" by redirecting stderr :

wd id "$article_string" 2> /dev/null

would that be enough for your need?