[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function
From: |
Voelker, Bernhard |
Subject: |
RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function |
Date: |
Thu, 16 Jun 2011 08:49:57 +0200 |
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 '%s\n' "$*" 1>&$stderr_fileno_ ;;
> *) ( IFS=' '; printf '%s\n' "$*" 1>&$stderr_fileno_ ) ;;
> esac
> }
is a subshell really needed to change IFS?
warn_ ()
{
IFS=' ' printf '%s\n' "$*" 1>&$stderr_fileno_
}
or don't all shells understand this?
Have a nice day,
Berny
- [PATCH] tests: use printf, not echo in init.sh's warn_ function, Jim Meyering, 2011/06/14
- Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Eric Blake, 2011/06/14
- Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Jim Meyering, 2011/06/14
- Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function, James Youngman, 2011/06/14
- Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Jim Meyering, 2011/06/17
- RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Voelker, Bernhard, 2011/06/20
- Re: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Jim Meyering, 2011/06/20
- RE: [PATCH] tests: use printf, not echo in init.sh's warn_ function, Voelker, Bernhard, 2011/06/20