[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bootstrap: use a more consistent error reporting scheme.
From: |
Jim Meyering |
Subject: |
Re: [PATCH] bootstrap: use a more consistent error reporting scheme. |
Date: |
Fri, 06 Jul 2012 17:49:03 +0200 |
Thien-Thi Nguyen wrote:
> () Akim Demaille <address@hidden>
> () Fri, 6 Jul 2012 16:40:37 +0200
>
> But we have to worry about ',' in $me, which is $0, not
> its basename. Do you want me (Akim, not the variable)
> to change me (the variable, not Akim; not that I am
> immutable) to basename and use / in the sed command,
> instead of ','?
>
> # warnf_ FORMAT-STRING ARG1...
> warnf_ ()
> {
> warnf_format_=$1
> shift
> printf "$warnf_format_" "$@" | sed "s,^,$me: ," >&2
> }
>
> Instead of these contortions, what about:
>
> printf "%s: $warnf_format" "$me" "$@"
>
> ?
Hi Thien-Thi,
We want warnf '%s\n' a b c d
to print this (as printf would do):
$me: a
$me: b
$me: c
$me: d
With that added "%s: ", and with "$me" inserted into the
list of arguments, we'd get this:
$me: a
b: c
d: $me
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., (continued)
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Stefano Lattarini, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Stefano Lattarini, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Paul Eggert, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Akim Demaille, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Jim Meyering, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Thien-Thi Nguyen, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme.,
Jim Meyering <=
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Thien-Thi Nguyen, 2012/07/06
- Re: [PATCH] bootstrap: use a more consistent error reporting scheme., Stefano Lattarini, 2012/07/06