bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible non-posix behaviour with sh/bash and IFS


From: Chet Ramey
Subject: Re: possible non-posix behaviour with sh/bash and IFS
Date: Sun, 10 Sep 2006 15:46:03 -0400
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

walter harms wrote:

> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
> 
> description:
> 
> according to this paper: http://www.unix.org/whitepapers/shdiffs.html
> 
> "If IFS is null, there is no separator, for example:
> 
>  $ IFS="
>  $ set a b c
>  $ echo "$*"
>  abc
> "
> 
> This does not work in ba/sh even when set -o posix is used there is also a 
> testcase for that
> non-posix behaviour.

Which test are you talking about?  Clearly bash-3.0 and bash-3.1 behave
as POSIX specifies:

$ cat x3
IFS=""
set a b c
echo "$*"

IFS=
set a b c
echo "$*"
z4.cns.cwru.edu(1)$ /bin/bash --version
GNU bash, version 3.1.17(1)-release (i386-apple-darwin8.6.1)
Copyright (C) 2005 Free Software Foundation, Inc.
$ /bin/bash ./x3
abc
abc
$ ../bash-3.0-patched/bash --version
GNU bash, version 3.00.16(2)-release (i386-apple-darwin8.6.1)
Copyright (C) 2004 Free Software Foundation, Inc.
$ ../bash-3.0-patched/bash ./x3
abc
abc


Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]