Le 6 juil. 2012 à 15:21, Stefano Lattarini a écrit : > Why not shave off the extra forks here? > > printf "$me: $warnf_format_" "$@" >&2 > > This shouldn't cause problems, unless '$me' contains '%' or '\' characters.
Or end of line. Elsewhere, where I use similar routines, it is useful to be able to output an error/log message from a tool for instance, which may be multiline. In that case I prefer to keep the original formatting, but prepend the name of the tool on each line. That's why I did it this way, but I'll do whatever people here tell me to.