This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: wordexp IFS fixes
- To: Matthias Urlichs <smurf@noris.de>
- Subject: Re: wordexp IFS fixes
- From: Tim Waugh <tim@cyberelk.demon.co.uk>
- Date: Wed, 9 Sep 1998 18:15:14 +0100 (BST)
- cc: libc-hacker@gnu.org
On 7 Sep 1998, Matthias Urlichs wrote:
> The shell is, however, free to ignore trailing $IFS characters (which makes
> a lot of sense if you assign the result of a command expansion to a
> variable or, worse, a shell array). This is, AFAIR, specified in the
> appropriate Posix document.
Really? In 3.6.5 ("Field Splitting"):
"(3) [...]
(a) IFS white space shall be ignored at the beginning and end of the
input.
(b) Each occurrence in the input of an IFS character that is not IFS
white space, along with any adjacent IFS white space, shall
delimit a field, as described previously.
(c) Nonzero-length IFS white space shall delimit a field."
The way I read it, the shell is not free to ignore trailing IFS characters
unless they are white space.
Tim.
*/