RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-20 Thread Voelker, Bernhard
Jim Meyering wrote: > Your name is on the following, so I'll wait for your ACK. > I used your email address from THANKS. > Let me know if you'd prefer a different one. that's fine, thanks. Have a nice day, Berny

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-20 Thread Jim Meyering
Voelker, Bernhard wrote: > why not re-using the same function, i.e. why not retire w2_? > btw: isn't head -1 deprecated use? Thanks for mentioning it. That usage is actually officially obsolete, now. The trouble is that "head -1" is more portable than "head -n1", so I'll replace it with sed 1q.

RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-20 Thread Voelker, Bernhard
Jim Meyering wrote: > From 7f8d9892fb4ce29821fc824defaa6e0d32740feb Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 14 Jun 2011 15:37:48 +0200 > Subject: [PATCH 1/3] tests: use printf, not echo in init.sh's warn_ function > > * tests/init.sh (warn_): Use printf, not echo. The latter

RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-16 Thread Voelker, Bernhard
Jim Meyering wrote: > James Youngman wrote: >> ( IFS=' '; printf '%s\n' "$*"; ) >> >> is perhaps slightly more reproducible. > > Good suggestion. Setting IFS does seem prudent. > However, I'm inclined to use a subshell only if necessary: > > warn_ () > { > case $IFS in > ' '*) printf

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-16 Thread Jim Meyering
Voelker, Bernhard wrote: > Jim Meyering wrote: >> James Youngman wrote: >>> ( IFS=' '; printf '%s\n' "$*"; ) >>> >>> is perhaps slightly more reproducible. >> >> Good suggestion. Setting IFS does seem prudent. >> However, I'm inclined to use a subshell only if necessary: >> >> warn_ () >> { >>

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-15 Thread Jim Meyering
James Youngman wrote: > I'd doubt that there are gnulib tests for which this will really make > a difference, but There is none in coreutils, but there *are* tests there that set IFS. Just none that use these relatively new functions in an affected scope. > ( IFS=' '; printf '%s\n' "$*"; ) > > is

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-14 Thread James Youngman
On Tue, Jun 14, 2011 at 3:26 PM, Eric Blake wrote: > You want: printf '%s\n' "$*" I'd doubt that there are gnulib tests for which this will really make a difference, but ( IFS=' '; printf '%s\n' "$*"; ) is perhaps slightly more reproducible. James.

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-14 Thread Jim Meyering
Eric Blake wrote: > On 06/14/2011 08:14 AM, Jim Meyering wrote: >> I have been using "warn/die"-style functions like these for a few years, >> and they are all based on printf (not echo) for precisely the reasons >> listed in the log below. I'm surprised that I put an echo-based >> implementation

Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-14 Thread Eric Blake
On 06/14/2011 08:14 AM, Jim Meyering wrote: > I have been using "warn/die"-style functions like these for a few years, > and they are all based on printf (not echo) for precisely the reasons > listed in the log below. I'm surprised that I put an echo-based > implementation into the relatively mode

[PATCH] tests: use printf, not echo in init.sh's warn_ function

2011-06-14 Thread Jim Meyering
ow, this fixes it: >From c1aff7b4429ec916f47ce115ab11e06938599e99 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 14 Jun 2011 15:37:48 +0200 Subject: [PATCH] tests: use printf, not echo in init.sh's warn_ function * tests/init.sh (warn_): Use printf, not echo. The latter would misbehav