0

Sometimes I write scripts where I want every called application to be verbose as can be for the sake of logging. This often includes typing --verbose quite a bit. Other than the -v and equivalent --verbose options often included with Unix/Linux utilities, is there an additional standard (or commonplace implementation) such as setting a variable VERBOSE=true in an environment, or setting some flag in a configuration file somewhere?

3
  • 3
    There isn't even a widespread or commonly used option for these. I feel I see --debug just as often as I see -v or --verbose (and no, the latter are often not equivalent).
    – muru
    May 13 at 3:45
  • If there was, it would likely break some of the scripts that use those commands when invoked in that environment, as they would start seeing output from them that they don't expect. May 18 at 6:13
  • 2
    @muru, not to mention that -d/-v are often used for things other than debug / verbose (such as destination, directory, verbose, reverse...). Sometimes, you need -d 3 / -v 3 to set the debug/verbose level. May 18 at 6:16

1 Answer 1

1

There are no standard options, environment variables, or other generally accepted mechanisms for enabling verbose output from utilities. The POSIX standard defines no standard generic option for this.

You will need to familiarise yourself with the utilities that your scripts are using and use their individually documented ways of adjusting the detail and/or amount of generated output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.