From friedman@splode.com Thu Nov 02 22:33:29 2000
Received: from scones-of-silence.splode.com ([207.44.243.49] helo=piglet.prv.splode.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13rXbc-0008OS-00
	for <bug-bash@gnu.org>; Thu, 02 Nov 2000 22:33:28 -0500
Received: (from friedman@localhost)
	by piglet.prv.splode.com (8.9.3/8.9.3) id TAA28929;
	Thu, 2 Nov 2000 19:33:27 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Noah Friedman <friedman@splode.com>
To: bug-bash@gnu.org
Subject: bash 2.03.6: suspending serial commands 
Reply-To: Noah Friedman <friedman@splode.com>
Date: Thu, 02 Nov 2000 19:33:27 -0800 (PST)
Message-Id: <20001102193327.236564.FMU26592@piglet.prv.splode.com>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

I typed:

    $ rm -rf foo.old && mv foo.old

then decided I wanted to background that set of commands.
When I hit C-Z, the rm was suspended, but the mv happened immediately.
I didn't notice that (since it was silent), then typed "bg" to background
the command.  

So of course, both directories got deleted.

Now if I'd typed

    $ rm -rf foo.old && mv foo.old &

then the correct thing would have happened.  So if you tell me that both
behaviors are mandated by posix, I will have to seek out and destroy every
last member of the posix.1 committee.  So I hope it's just a bug in bash.
:-)


From friedman@splode.com Thu Nov 02 22:46:09 2000
Received: from scones-of-silence.splode.com ([207.44.243.49] helo=piglet.prv.splode.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13rXnt-0000O8-00
	for <bug-bash@gnu.org>; Thu, 02 Nov 2000 22:46:09 -0500
Received: (from friedman@localhost)
	by piglet.prv.splode.com (8.9.3/8.9.3) id TAA28960;
	Thu, 2 Nov 2000 19:46:08 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Noah Friedman <friedman@splode.com>
To: bug-bash@gnu.org
Subject: Re: bash 2.03.6: suspending serial commands 
Reply-To: Noah Friedman <friedman@splode.com>
Date: Thu, 02 Nov 2000 19:46:08 -0800 (PST)
Message-Id: <20001102194608.672820.FMU26592@piglet.prv.splode.com>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

>I typed:
>
>    $ rm -rf foo.old && mv foo.old

Doh!  I meant:

     $ rm -rf foo.old && mv foo foo.old

Doesn't impact my report except to clarify what I was doing and why it
caused much suffering...


From kt6373@orion.pspt.fi Fri Nov 03 10:24:01 2000
Received: from dakota.pspt.fi ([193.167.78.100])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13rihF-0003gb-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 03 Nov 2000 10:24:01 -0500
Received: from orion.pspt.fi (kt6373@orion.pspt.fi [193.167.78.220])
	by dakota.pspt.fi (8.10.1/8.10.1) with ESMTP id eA3FPiM08911
	for <bug-bash@prep.ai.mit.edu>; Fri, 3 Nov 2000 17:25:46 +0200 (EET)
Received: (from kt6373@localhost)
	by orion.pspt.fi (8.8.8/8.8.8) id RAA17248
	for bug-bash@prep.ai.mit.edu; Fri, 3 Nov 2000 17:21:05 +0200 (EET)
Date: Fri, 3 Nov 2000 17:21:05 +0200 (EET)
From: Tuomo Luosujärvi AMOO2 <kt6373@orion.pspt.fi>
Message-Id: <200011031521.RAA17248@orion.pspt.fi>
To: bug-bash@prep.ai.mit.edu
Subject: [50 character or so descriptive subject here (for reference)]
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DHOSTTYPE='sparc' -DOSTYPE='solaris2.5' -DMACHTYPE='sparc-sun-solaris2.5' -DSHELL  -DHAVE_CONFIG_H   -I. -I. -I./lib -g -O2
uname output: SunOS orion.pspt.fi 5.5.1 Generic_103640-34 sun4m sparc SUNW,SPARCstation-20
Machine Type: sparc-sun-solaris2.5

Bash Version: 2.0
Patch Level: 0
Release Status: release

Description:
	[Detailed description of the problem, suggestion, or complaint.]

Repeat-By:
	[Describe the sequence of events that causes the problem
	to occur.]

Fix:
	[Description of how to fix the problem.  If you don't know a
	fix for the problem, don't include this section.]
cls





89q
74q


Q




From jik@kamens.brookline.ma.us Fri Nov 03 10:27:57 2000
Received: from jik-0.dsl.speakeasy.net ([216.254.78.45] helo=jik.kamens.brookline.ma.us)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13ril3-0003l3-00
	for <bug-bash@gnu.org>; Fri, 03 Nov 2000 10:27:57 -0500
Received: (from jik@localhost)
	by jik.kamens.brookline.ma.us (8.10.1/8.10.1) id eA3GRtf07719;
	Fri, 3 Nov 2000 11:27:55 -0500
Date: Fri, 3 Nov 2000 11:27:55 -0500
From: Jonathan Kamens <jik@kamens.brookline.ma.us>
Message-Id: <200011031627.eA3GRtf07719@jik.kamens.brookline.ma.us>
To: bug-bash@gnu.org
Subject: "GROUPS" is read-only, but only sort of
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

[jik@jik installer]$ echo $BASH_VERSION
2.04.4(1)-release
[jik@jik installer]$ GROUPS=foo
[jik@jik installer]$ echo $GROUPS; GROUPS=foo; echo $GROUPS
3009
foo

There are two different problems here:

1) It is exceedingly bogus that attempts to modify the GROUPS variable
are silently ignored.  If bash is going to make the variable
read-only, then it should make the variable read-only, darn it, and
attempts to assign values to it should cause an errors.  I spent hours
and hours tracking down wrong behavior in a script which used a
variable named GROUPS and couldn't understand why it wasn't getting
set properly.

2) Bash isn't even consistent about enforcing the read-only
restriction on this variable.  As shown above, after you echo it once,
you can change its value.  I assume that this behavior is
unintentional?

  jik


From chet@nike.ins.cwru.edu Fri Nov 03 13:07:04 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13rlEz-0007HP-00
	for <bug-bash@gnu.org>; Fri, 03 Nov 2000 13:07:02 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id NAA88300; Fri, 3 Nov 2000 13:06:54 -0500 (EST) (from chet)
Date: Fri, 3 Nov 2000 13:04:07 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: jik@kamens.brookline.ma.us
Subject: Re: "GROUPS" is read-only, but only sort of
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001103180407.AA88293.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from jik@kamens.brookline.ma.us of Fri, 3 Nov 2000 11:27:55 -0500 (id <200011031627.eA3GRtf07719@jik.kamens.brookline.ma.us>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> [jik@jik installer]$ echo $BASH_VERSION
> 2.04.4(1)-release
> [jik@jik installer]$ GROUPS=foo
> [jik@jik installer]$ echo $GROUPS; GROUPS=foo; echo $GROUPS
> 3009
> foo
> 
> There are two different problems here:
> 
> 1) It is exceedingly bogus that attempts to modify the GROUPS variable
> are silently ignored.  If bash is going to make the variable
> read-only, then it should make the variable read-only, darn it, and
> attempts to assign values to it should cause an errors.  I spent hours
> and hours tracking down wrong behavior in a script which used a
> variable named GROUPS and couldn't understand why it wasn't getting
> set properly.

The current behavior is documented.

GROUPS was originally readonly.  People complained that they could not even
unset it (since readonly variables can't be unset), and that screwed up
their scripts.  I received multiple complaints about the oracle install
script, for one.

The current behavior is a compromise.  GROUPS is essentially readonly,
but may be unset.

> 2) Bash isn't even consistent about enforcing the read-only
> restriction on this variable.  As shown above, after you echo it once,
> you can change its value.  I assume that this behavior is
> unintentional?

That's a bug that's already been fixed.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From jik@kamens.brookline.ma.us Fri Nov 03 14:05:49 2000
Received: from jik-0.dsl.speakeasy.net ([216.254.78.45] helo=jik.kamens.brookline.ma.us)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13rm9t-0000ng-00
	for <bug-bash@gnu.org>; Fri, 03 Nov 2000 14:05:49 -0500
Received: (from jik@localhost)
	by jik.kamens.brookline.ma.us (8.10.1/8.10.1) id eA3K5kd19283;
	Fri, 3 Nov 2000 15:05:46 -0500
Date: Fri, 3 Nov 2000 15:05:46 -0500
From: Jonathan Kamens <jik@kamens.brookline.ma.us>
Message-Id: <200011032005.eA3K5kd19283@jik.kamens.brookline.ma.us>
To: chet@po.cwru.edu
CC: bug-bash@gnu.org, chet@po.cwru.edu
In-reply-to: <1001103180407.AA88293.SM@nike.ins.cwru.edu> (message from Chet
	Ramey on Fri, 3 Nov 2000 13:04:07 -0500)
Subject: Re: "GROUPS" is read-only, but only sort of
References:  <1001103180407.AA88293.SM@nike.ins.cwru.edu>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

>  Date: Fri, 3 Nov 2000 13:04:07 -0500
>  From: Chet Ramey <chet@nike.ins.cwru.edu>
>  
>  The current behavior is documented.

The fact that something is documented doesn't make it OK.

This makes bash incompatible with every other Bourne-compatible
shell.  In fact, it makes bash a Bourne-*in*compatible shell.  Scripts
which are written to use only standard sh constructs can fail
silently, with no obvious explanation, under bash, just for using a
variable named GROUPS.

>  GROUPS was originally readonly.  People complained that they could not even
>  unset it (since readonly variables can't be unset), and that screwed up
>  their scripts.  I received multiple complaints about the oracle install
>  script, for one.
>  
>  The current behavior is a compromise.  GROUPS is essentially readonly,
>  but may be unset.

But all of those scripts will continue to break, but in a completely
different way!  How can an installation script know that before it's
allowed to set a variable named GROUPS, it has to unset it?

At least if attempting to reset GROUPS caused a visbible error, people
writing or maintaining such scripts would know immediately what the
problem is.  I fail to see how the current behavior can be preferable
to that.

  jik


From news@news2-win.server.ntlworld.com Sat Nov 04 10:41:28 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13s5Rf-0006ZL-00
	for <bug-bash@prep.ai.mit.edu>; Sat, 04 Nov 2000 10:41:28 -0500
Received: from news2b-win.server.ntlworld.com ([62.253.162.103] helo=news2-win.server.ntlworld.com)
	by chx400.switch.ch with esmtp (Exim 3.15 #3)
	id 13s5Rf-0002QP-00
	for gnu-bash-bug@moderators.isc.org; Sat, 04 Nov 2000 16:41:27 +0100
Received: (from news@localhost)
	by news2-win.server.ntlworld.com (8.8.8+Sun/8.8.8) id PAA24161;
	Sat, 4 Nov 2000 15:41:21 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: Nobody<nobody@hotmail.com>
Newsgroups: gnu.bash.bug 
Subject: LOOK! I FOUND BULK-FRIENDLY WEB HOSTING!!
Lines: 21
Message-ID: <B6WM5.12220$mv2.65767@news2-win.server.ntlworld.com>
Date: Sat, 04 Nov 2000 15:41:21 GMT
NNTP-Posting-Host: 62.253.144.98
X-Complaints-To: abuse@ntlworld.com
X-Trace: news2-win.server.ntlworld.com 973352481 62.253.144.98 (Sat, 04 Nov 2000 15:41:21 GMT)
NNTP-Posting-Date: Sat, 04 Nov 2000 15:41:21 GMT
Organization: ntlworld News Service
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Contact sales@hostmatters.com or call TOLL-FREE on 1-877-381-1083 if you have any questions.

Dear Readers,

I have found this incredible service called HOSTING MATTERS

Hosting Matters is a fantastic way to host adult and bulk email-friendly web sites with NO WORRIES about getting shut down as they are only out to try and make money, not police the net. The service is VERY CHEAP and I recommend it for the following types of sites:

- Bulk emailing
- Adult content & services
- Controversial/Hate sites

As far as I know, they have NEVER shut down above-mentioned types of sites!

For more info contact them on the web site below.

http://www.hostmatters.com

or an alternative URL:

http://www.hostingmatters.com


From news@news2-win.server.ntlworld.com Sun Nov 05 14:35:09 2000
Received: from sprettur.isnet.is ([193.4.58.19])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13sVZM-0005XU-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 05 Nov 2000 14:35:08 -0500
Received: from news2-win.server.ntlworld.com (news2-win.server.ntlworld.com [62.253.162.102])
	by sprettur.isnet.is (8.11.0/8.11.0/isnet) with ESMTP id eA5JZ7A55138
	for <gnu-bash-bug@moderators.isc.org>; Sun, 5 Nov 2000 19:35:07 GMT
	(envelope-from news@news2-win.server.ntlworld.com)
Received: (from news@localhost)
	by news2-win.server.ntlworld.com (8.8.8+Sun/8.8.8) id TAA17569;
	Sun, 5 Nov 2000 19:35:04 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: Nobody<nobody@hotmail.com>
Newsgroups: gnu.bash.bug
Subject: BULK EMAIL-FRIENDLY WEB HOSTING!!!!
Lines: 21
Message-ID: <HDiN5.45027$mv2.117395@news2-win.server.ntlworld.com>
Date: Sun, 05 Nov 2000 19:35:03 GMT
NNTP-Posting-Host: 62.253.144.59
X-Complaints-To: abuse@ntlworld.com
X-Trace: news2-win.server.ntlworld.com 973452903 62.253.144.59 (Sun, 05 Nov 2000 19:35:03 GMT)
NNTP-Posting-Date: Sun, 05 Nov 2000 19:35:03 GMT
Organization: ntlworld News Service
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Contact sales@hostmatters.com or call TOLL-FREE on 1-877-381-1083 if you have any questions.

Dear Readers,

I have found this incredible service called HOSTING MATTERS

Hosting Matters is a fantastic way to host adult and bulk email-friendly web sites with NO WORRIES about getting shut down as they are only out to try and make money, not police the net. The service is VERY CHEAP and I recommend it for the following types of sites:

- Bulk emailing
- Adult content & services
- Controversial/Hate sites

As far as I know, they have NEVER shut down above-mentioned types of sites!

For more info contact them on the web site below.

http://www.hostmatters.com

or an alternative URL:

http://www.hostingmatters.com


From dingrg@fujitsu-nfcp.com Sun Nov 05 22:11:51 2000
Received: from [202.102.24.41] (helo=ldap2.ptt.js.cn)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13schK-0006Za-00
	for <bug-bash@gnu.org>; Sun, 05 Nov 2000 22:11:51 -0500
Received: from freedom ([202.111.30.30]) by ldap2.ptt.js.cn
          (Netscape Messaging Server 4.15) with SMTP id G3L2IF02.G02 for
          <bug-bash@gnu.org>; Mon, 6 Nov 2000 11:18:15 +0800 
Message-ID: <008b01c0479f$526b26a0$28c809c0@nfcp.com>
From: "Renguo Ding" <dingrg@fujitsu-nfcp.com>
To: <bug-bash@gnu.org>
Subject: Ftp passwd failed,when i use bash 2.04
Date: Mon, 6 Nov 2000 11:10:34 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_007C_01C047E2.2EF59000"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

This is a multi-part message in MIME format.

------=_NextPart_000_007C_01C047E2.2EF59000
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: base64

Q29uZmlndXJhdGlvbiBJbmZvcm1hdGlvbiBbQXV0b21hdGljYWxseSBnZW5lcmF0ZWQsIGRvIG5v
dCBjaGFuZ2VdOg0KTWFjaGluZTogc3BhcmMNCk9TOiBzb2xhcmlzMi43DQpDb21waWxlcjogZ2Nj
DQpDb21waWxhdGlvbiBDRkxBR1M6ICAtRFBST0dSQU09J2Jhc2gnIC1EQ09ORl9IT1NUVFlQRT0n
c3BhcmMnIC1EQ09ORl9PU1RZUEU9J3NvbA0KYXJpczIuNycgLURDT05GX01BQ0hUWVBFPSdzcGFy
Yy1zdW4tc29sYXJpczIuNycgLURDT05GX1ZFTkRPUj0nc3VuJyAtRFNIRUxMICAtREgNCkFWRV9D
T05GSUdfSCAgLURfTEFSR0VGSUxFX1NPVVJDRSAtRF9GSUxFX09GRlNFVF9CSVRTPTY0IC1EX0xB
UkdFRklMRTY0X1NPVVJDRSAtDQpJLiAgLUkuIC1JLi9pbmNsdWRlIC1JLi9saWIgLUkvdXNyL2xv
Y2FsL2luY2x1ZGUgLWcgLU8yDQp1bmFtZSBvdXRwdXQ6IFN1bk9TIHVsdHJhNjAuc29sYXJpcy5j
b20uY24gNS43IEdlbmVyaWNfMTA2NTQxLTA0IHN1bjR1IHNwYXJjIFNVTg0KVyxVbHRyYS02MA0K
TWFjaGluZSBUeXBlOiBzcGFyYy1zdW4tc29sYXJpczIuNw0KDQpCYXNoIFZlcnNpb246IDIuMDQN
ClBhdGNoIExldmVsOiAwDQpSZWxlYXNlIFN0YXR1czogcmVsZWFzZQ0KDQpEZXNjcmlwdGlvbjoN
Cg0KICAgIEkgaW5zdGFsbGVkIEJhc2gtMi4wNCBvbiBVbHRyYS02MCB3b3Jrc3RhdGlvbiAsIGFu
ZCBjaGFuZ2VkIG15IHNoZWxsIHRvIGJhc2gtMi4wNCwNCml0IHdvcmtzIHZlcnkgd2VsbCAodGVs
bmV0IE9LKSAsIGJ1dCBpIGNhbiBub3QgdXNlIG15IGFjY291bnQgZnRwIGFjY2VzcyB0byBVbHRy
YS02MCwgDQpzbyBpIGNoYW5nZWQgbXkgc2hlbGwgdG8gb3JpZ2luYWwgc2hlbGwsIGZ0cCBhY2Nl
c3MgT0shIHNvIGkgdGhpbmsgdGhlIG11c3QgYmVlbiBzb21lIA0KYnVncyBpbiB0aGUgYmFzaC0y
LjA0ICwgcGxlYXNlIGhlbHAgbWUgdG8gc29sdmUgdGhlIHByb2JsZW0uDQoNClRoZSBlcnJvciBt
ZXNzYWdlcyBsaXN0IGluIGJlbG93IDoNCjIyMCB1bHRyYTYwLnNvbGFyaXMuY29tLmNuIEZUUCBz
ZXJ2ZXIgKFN1bk9TIDUuNykgcmVhZHkuDQpOYW1lICgxOTIuOS4yMDAuOTk6Z3Vlc3QpOg0KMzMx
IFBhc3N3b3JkIHJlcXVpcmVkIGZvciBndWVzdC4NClBhc3N3b3JkOiAoKioqKiBwYXNzd2QgZW50
ZXIgT0spDQo1MzAgTG9naW4gaW5jb3JyZWN0Lg0KTG9naW4gZmFpbGVkLg0KDQoNClJlcGVhdC1C
eToNCiAgICAgICAgW0Rlc2NyaWJlIHRoZSBzZXF1ZW5jZSBvZiBldmVudHMgdGhhdCBjYXVzZXMg
dGhlIHByb2JsZW0NCiAgICAgICAgdG8gb2NjdXIuXQ0KDQpGaXg6DQogICAgICAgIFtEZXNjcmlw
dGlvbiBvZiBob3cgdG8gZml4IHRoZSBwcm9ibGVtLiAgSWYgeW91IGRvbid0IGtub3cgYQ0KICAg
ICAgICBmaXggZm9yIHRoZSBwcm9ibGVtLCBkb24ndCBpbmNsdWRlIHRoaXMgc2VjdGlvbi5dDQoN
Cg0K

------=_NextPart_000_007C_01C047E2.2EF59000
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PWdi
MjMxMiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNS4w
MC4yNjE0LjM1MDAiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8
Qk9EWSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPjxGT05UIHNpemU9Mj5Db25maWd1cmF0aW9uIElu
Zm9ybWF0aW9uIFtBdXRvbWF0aWNhbGx5IGdlbmVyYXRlZCwgZG8gbm90IA0KY2hhbmdlXTo8QlI+
TWFjaGluZTogc3BhcmM8QlI+T1M6IHNvbGFyaXMyLjc8QlI+Q29tcGlsZXI6IGdjYzxCUj5Db21w
aWxhdGlvbiANCkNGTEFHUzombmJzcDsgLURQUk9HUkFNPSdiYXNoJyAtRENPTkZfSE9TVFRZUEU9
J3NwYXJjJyANCi1EQ09ORl9PU1RZUEU9J3NvbDxCUj5hcmlzMi43JyAtRENPTkZfTUFDSFRZUEU9
J3NwYXJjLXN1bi1zb2xhcmlzMi43JyANCi1EQ09ORl9WRU5ET1I9J3N1bicgLURTSEVMTCZuYnNw
OyAtREg8QlI+QVZFX0NPTkZJR19IJm5ic3A7IC1EX0xBUkdFRklMRV9TT1VSQ0UgDQotRF9GSUxF
X09GRlNFVF9CSVRTPTY0IC1EX0xBUkdFRklMRTY0X1NPVVJDRSAtPEJSPkkuJm5ic3A7IC1JLiAt
SS4vaW5jbHVkZSANCi1JLi9saWIgLUkvdXNyL2xvY2FsL2luY2x1ZGUgLWcgLU8yPEJSPnVuYW1l
IG91dHB1dDogU3VuT1MgDQp1bHRyYTYwLnNvbGFyaXMuY29tLmNuIDUuNyBHZW5lcmljXzEwNjU0
MS0wNCBzdW40dSBzcGFyYyANClNVTjxCUj5XLFVsdHJhLTYwPEJSPk1hY2hpbmUgVHlwZTogc3Bh
cmMtc3VuLXNvbGFyaXMyLjc8L0ZPTlQ+PC9ESVY+DQo8RElWPiZuYnNwOzwvRElWPg0KPERJVj48
Rk9OVCBzaXplPTI+QmFzaCBWZXJzaW9uOiAyLjA0PEJSPlBhdGNoIExldmVsOiAwPEJSPlJlbGVh
c2UgU3RhdHVzOiANCnJlbGVhc2U8L0ZPTlQ+PC9ESVY+DQo8RElWPiZuYnNwOzwvRElWPg0KPERJ
Vj48Rk9OVCBzaXplPTI+RGVzY3JpcHRpb246PC9GT05UPjwvRElWPg0KPERJVj48Rk9OVCBzaXpl
PTI+PC9GT05UPiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBzaXplPTI+Jm5ic3A7Jm5ic3A7Jm5i
c3A7IEkgaW5zdGFsbGVkIEJhc2gtMi4wNCBvbiBVbHRyYS02MCANCndvcmtzdGF0aW9uJm5ic3A7
LCBhbmQgY2hhbmdlZCBteSBzaGVsbCB0byBiYXNoLTIuMDQsPC9GT05UPjxGT05UIA0Kc2l6ZT0y
PjwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPml0IHdvcmtzIHZlcnkgd2VsbCAodGVs
bmV0IE9LKSAsIGJ1dCBpIGNhbiBub3QgdXNlIG15IGFjY291bnQgDQpmdHAgYWNjZXNzIHRvIFVs
dHJhLTYwLCA8L0ZPTlQ+PC9ESVY+DQo8RElWPjxGT05UIHNpemU9Mj5zbyBpIGNoYW5nZWQgPC9G
T05UPjxGT05UIHNpemU9Mj5teSBzaGVsbCB0byBvcmlnaW5hbCBzaGVsbCwgDQpmdHAgYWNjZXNz
IE9LISBzbyBpIHRoaW5rIHRoZSBtdXN0IGJlZW4gc29tZSA8L0ZPTlQ+PC9ESVY+DQo8RElWPjxG
T05UIHNpemU9Mj5idWdzIGluIHRoZSA8L0ZPTlQ+PEZPTlQgc2l6ZT0yPmJhc2gtMi4wNCAsIHBs
ZWFzZSBoZWxwIG1lIHRvIA0Kc29sdmUgdGhlIHByb2JsZW0uPC9GT05UPjwvRElWPg0KPERJVj48
Rk9OVCBzaXplPTI+PC9GT05UPiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBzaXplPTI+VGhlIGVy
cm9yIG1lc3NhZ2VzIGxpc3QgaW4gYmVsb3cgOjwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6
ZT0yPjIyMCB1bHRyYTYwLnNvbGFyaXMuY29tLmNuIEZUUCBzZXJ2ZXIgKFN1bk9TIDUuNykgDQpy
ZWFkeS48QlI+TmFtZSAoMTkyLjkuMjAwLjk5Omd1ZXN0KTo8QlI+MzMxIFBhc3N3b3JkIHJlcXVp
cmVkIGZvciANCmd1ZXN0LjxCUj5QYXNzd29yZDogKCoqKiogcGFzc3dkIGVudGVyIE9LKTxCUj41
MzAgTG9naW4gaW5jb3JyZWN0LjxCUj5Mb2dpbiANCmZhaWxlZC48L0ZPTlQ+PC9ESVY+DQo8RElW
PjxGT05UIHNpemU9Mj48QlI+PC9GT05UPiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBzaXplPTI+
UmVwZWF0LUJ5OjxCUj4mbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsg
DQpbRGVzY3JpYmUgdGhlIHNlcXVlbmNlIG9mIGV2ZW50cyB0aGF0IGNhdXNlcyB0aGUgDQpwcm9i
bGVtPEJSPiZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyB0byBvY2N1
ci5dPC9GT05UPjwvRElWPg0KPERJVj4mbmJzcDs8L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPkZp
eDo8QlI+Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7IA0KW0Rlc2Ny
aXB0aW9uIG9mIGhvdyB0byBmaXggdGhlIHByb2JsZW0uJm5ic3A7IElmIHlvdSBkb24ndCBrbm93
IA0KYTxCUj4mbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsgZml4IGZv
ciB0aGUgcHJvYmxlbSwgZG9uJ3QgDQppbmNsdWRlIHRoaXMgc2VjdGlvbi5dPEJSPjwvRk9OVD48
L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPjwvRk9OVD4mbmJzcDs8L0RJVj48L0JPRFk+PC9IVE1M
Pg0K

------=_NextPart_000_007C_01C047E2.2EF59000--



From dsimpson@doas.state.ga.us Mon Nov 06 09:28:49 2000
Received: from gw.doas.state.ga.us ([167.193.64.49])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13snGT-0007Oe-00
	for <bug-bash@gnu.org>; Mon, 06 Nov 2000 09:28:49 -0500
Received: from DOAS_TT-Message_Server by gw.doas.state.ga.us
	with Novell_GroupWise; Mon, 06 Nov 2000 09:28:54 -0500
Message-Id: <sa0679d6.032@gw.doas.state.ga.us>
X-Mailer: Novell GroupWise Internet Agent 5.5.3.1
Date: Mon, 06 Nov 2000 09:28:42 -0500
From: "Doug Simpson" <dsimpson@doas.state.ga.us>
To: <bug-bash@gnu.org>
Subject: Brace expansion clones <() process substitutions
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Greetings,

In bash version 1.14.7(1) under Redhat Linux 6.1:

#
# larg - function to list arguments
#

larg() {
   local i=3D1
   while [ $i -le $# ]; do
      eval echo "\$$i"
      let i+=3D1
   done
}

$ larg <( larg x a{d,c,b}e )=20
/dev/fd/3
/dev/fd/4
/dev/fd/5
$
$ larg <( echo x a{d,c,b,e} )   ;# to eliminate potential 'larg' weirdness
/dev/fd/3
/dev/fd/4
/dev/fd/5
$
$ cat <( larg x a{d,c,b}e )
x
ade
x
ace
x
abe
$

It appears the brace expansion is

   cat <( larg x ade ) <( larg x abe ) <( larg x ace )

rather than

   cat <( larg x ade abe ace )

Is this a feature or a bug?  I would say bug, but then I am a newbie to =
both unix and bash.  I've read the info page ten times on brace expansion. =
 If this cloning of <() is normal behavior, please explain to me how the =
effects of the expansion could extend beyond the whitepace on either side =
of a{d,c,b}e.

I would have searched for a fix in a later release, but the archive for =
this list did not appear to be searchable without a download.

Thanks,

Doug

Doug Simpson
Router Engineer
State of Georgia
404.463.8468



From chet@granite.ins.cwru.edu Mon Nov 06 10:00:05 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13snki-0008Ai-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 06 Nov 2000 10:00:04 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA11597; Mon, 6 Nov 2000 10:00:02 -0500 (EST) (from chet)
Message-Id: <200011061500.KAA11597@granite.INS.CWRU.Edu>
Date: Mon, 6 Nov 2000 10:00:02 -0500 (EST)
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@prep.ai.mit.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.9)
Reply-To: chet@po.cwru.edu
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Thu May 18 13:08:48 EDT 2000
FAQ-Version: 3.9
Bash-Version: 2.04
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)

This is the Bash FAQ, version 3.9, for Bash version 2.04.

This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell.  Bash is a freely-available command
interpreter with advanced features for both interactive use and shell
programming.

Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.

Questions and comments concerning this document should be sent to
chet@po.cwru.edu.

This document is available for anonymous FTP with the URL

ftp://ftp.cwru.edu/pub/bash/FAQ

The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html

----------
Contents:

Section A:  The Basics

A1) What is it?
A2) What's the latest version?
A3) Where can I get it?
A4) On what machines will bash run?
A5) Will bash run on operating systems other than Unix?
A6) How can I build bash with gcc?
A7) How can I make bash my login shell?
A8) I just changed my login shell to bash, and now I can't FTP into my
    machine.  Why not?
A9) What's the `POSIX 1003.2 standard'?
A10) What is the bash `posix mode'?

Section B:  The latest version

B1) What's new in version 2.04?
B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?
C2) How does bash differ from the Korn shell, version ksh88?
C3) Which new features in ksh-93 are not in bash, and which are?

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?
D2) Why doesn't bash treat brace expansions exactly like csh?
D3) Why doesn't bash have csh variable modifiers?
D4) How can I make my csh aliases work when I convert to bash?
D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?
D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

Section E:  Why does bash do certain things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?
E2) Why does bash sometimes say `Broken pipe'?
E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?
E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?
E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?
E6) Why doesn't a while or for loop get suspended when I type ^Z?
E7) What about empty for loops in Makefiles?
E8) Why does the arithmetic evaluation code complain about `08'?

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?
F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?
F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?
F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?
F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?
F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?
G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?
G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?
G4) How can I make the bash `time' reserved word print timing output that
    looks like the output from my system's /usr/bin/time?
G5) How do I get the current directory into my prompt?
G6) How can I rename "*.foo" to "*.bar"?
G7) How can I translate a filename from uppercase to lowercase?
G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?
H2) What kind of bash documentation is there?
H3) What's coming in future versions?
H4) What's on the bash `wish list'?
H5) When will the next release appear?

----------
Section A:  The Basics

A1)  What is it?

Bash is a Unix command interpreter (shell).  It is an implementation of
the Posix 1003.2 shell standard, and resembles the Korn and System V
shells.

Bash contains a number of enhancements over those shells, both
for interactive use and shell programming.  Features geared
toward interactive use include command line editing, command
history, job control, aliases, and prompt expansion.  Programming
features include additional variable expansions, shell
arithmetic, and a number of variables and options to control
shell behavior.

Bash was originally written by Brian Fox of the Free Software
Foundation.  The current developer and maintainer is Chet Ramey
of Case Western Reserve University.

A2)  What's the latest version?

The latest version is 2.04, first made available on Friday, 17 March 2000.

A3)  Where can I get it?

Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors.  The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 2.04:

ftp://ftp.gnu.org/pub/gnu/bash/bash-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.04.tar.gz

Formatted versions of the documentation are available with the URLs:

ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.04.tar.gz

A4)  On what machines will bash run?

Bash has been ported to nearly every version of UNIX.  All you
should have to do to build it on a machine for which a port
exists is to type `configure' and then `make'.  The build process
will attempt to discover the version of UNIX you have and tailor
itself accordingly, using a script created by GNU autoconf.

More information appears in the file `INSTALL' in the distribution.

A5) Will bash run on operating systems other than Unix?

Configuration specifics for Unix-like systems such as QNX and
LynxOS are included in the distribution.  Bash-2.04 should 
compile and run on Minix 2.0 (patches were contributed), but I
don't believe anyone has built bash-2.x on earlier Minix versions
yet.

Bash has been ported to versions of Windows implementing the Win32
programming interface.  This includes Windows 95 and Windows NT.
The port was done by Cygnus Solutions as part of their CYGWIN
project.  For more information about the project, look at the URL

http:/sourceware.cygnus.com/cygwin

Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases.  Cygnus has also done a
port of bash-2.02.1 to the CYGWIN environment, and it is available as
part of their current release.  (They may have upgraded by now.)

Bash-2.04 should require no local Cygnus changes to build and run under
CYGWIN.

The Cygnus port works only on Intel machines.  There is a port of bash
(I don't know which version) to the alpha/NT environment available from

ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz

Softway Systems has ported bash-2.01 to their Interix (nee OpenNT)
system, a Unix subsystem for NT that replaces the Microsoft POSIX
subsystem.  Check out http://www.interix.com for more information.
Some support for Interix has been incorporated into bash, beginning
with Bash-2.03.  It should be easier to build bash on Interix now,
but Interix users should fetch

ftp://ftp.interix.com/pub/tw/unsup/bash.diffs.tar.gz

and read the README.OpenNT file in that archive.  It will detail the
arguments `configure' needs to build on Interix.  A configure cache
file for Interix is in the bash distribution in cross-build/opennt.cache;
copy that to `config.cache' before starting configure.

DJ Delorie has a port of bash-1.14.7 which runs under MS-DOS, as part
of the DJGPP project.  For more information on the project, see

http://www.delorie.com/djgpp/

I have been told that the original DJGPP port was done by Daisuke Aoyama.

I picked up a binary of bash-1.14.7 that is purported to work with
the DJGPP V2 environment from

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147b.zip

The corresponding source is

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147s.zip

Mark Elbrecht <snowball3@bigfoot.com> has sent me notice that bash-2.03
has become available for DJGPP V2.  The files are available as:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203b.zip	binary
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203d.zip	documentation
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203s.zip	source

Mark has begun to work with bash-2.04.

Ports of bash-1.12 and bash-2.0 are available for OS/2 from

ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash_112.zip
ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash-2.0(253).zip

I haven't looked at either, but the second appears to be a binary-only
distribution.  Beware.

I have received word that Bash (I'm not sure which version, but I
believe that it's at least bash-2.02.1) is the standard shell on
BeOS.

A6) How can I build bash with gcc? 

Bash configures to use gcc by default if it is available.  Read the
file INSTALL in the distribution for more information.

A7)  How can I make bash my login shell?

Some machines let you use `chsh' to change your login shell.  Other
systems use `passwd -s' or `passwd -e'.  If one of these works for
you, that's all you need.  Note that many systems require the full
pathname to a shell to appear in /etc/shells before you can make it
your login shell.  For this, you may need the assistance of your
friendly local system administrator. 

If you cannot do this, you can still use bash as your login shell, but
you need to perform some tricks.  The basic idea is to add a command
to your login shell's startup file to replace your login shell with
bash.

For example, if your login shell is csh or tcsh, and you have installed
bash in /usr/gnu/bin/bash, add the following line to ~/.login:

	if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login

(the `--login' tells bash that it is a login shell).

It's not a good idea to put this command into ~/.cshrc, because every
csh you run without the `-f' option, even ones started to run csh scripts,
reads that file.  If you must put the command in ~/.cshrc, use something
like

	if ( $?prompt ) exec /usr/gnu/bin/bash --login

to ensure that bash is exec'd only when the csh is interactive.

If your login shell is sh or ksh, you have to do two things.

First, create an empty file in your home directory named `.bash_profile'.
The existence of this file will prevent the exec'd bash from trying to
read ~/.profile, and re-execing itself over and over again.  ~/.bash_profile
is the first file bash tries to read initialization commands from when
it is invoked as a login shell.

Next, add a line similar to the above to ~/.profile:

        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login

This will cause login shells to replace themselves with bash running as
a login shell.  Once you have this working, you can copy your initialization
code from ~/.profile to ~/.bash_profile.

I have received word that the recipe supplied above is insufficient for
machines running CDE.  CDE has a maze of twisty little startup files, all
slightly different.

If you cannot change your login shell in the password file to bash, you
will have to (apparently) live with CDE using the shell in the password
file to run its startup scripts.  If you have changed your shell to bash,
there is code in the CDE startup files (on Solaris, at least) to do the
right thing. 

`dtterm' claims to use $SHELL as the default program to start, so if you
can change $SHELL in the CDE startup files, you should be able to use bash
in your terminal windows.

Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program
to read your login shell's startup files.  You may be able to use bash for
the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as
well, but I have not tried this.

You can use the above `exec' recipe to start bash when not logging in with
CDE by testing the value of the DT variable:

	if [ -n "$DT" ]; then
	        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
	fi


A8) I just changed my login shell to bash, and now I can't FTP into my
   machine.  Why not?

You must add the full pathname to bash to the file /etc/shells.  As
noted in the answer to the previous question, many systems require
this before you can make bash your login shell. 

Most versions of ftpd use this file to prohibit `special' users
such as `uucp' and `news' from using FTP. 

A9)  What's the `POSIX 1003.2 standard'?

POSIX is a name originally coined by Richard Stallman for a
family of open system standards based on UNIX.  There are a
number of aspects of UNIX under consideration for
standardization, from the basic system services at the system
call and C library level to applications and tools to system
administration and management.  Each area of standardization is
assigned to a working group in the 1003 series. 

The POSIX Shell and Utilities standard has been developed by IEEE
Working Group 1003.2 (POSIX.2).  It concentrates on the command
interpreter interface and utility programs commonly executed from
the command line or by other programs.  An initial version of the
standard has been approved and published by the IEEE, and work is
currently underway to update it. 

Bash is concerned with the aspects of the shell's behavior
defined by POSIX.2.  The shell command language has of course
been standardized, including the basic flow control and program
execution constructs, I/O redirection and pipelining, argument
handling, variable expansion, and quoting. 

The `special' builtins, which must be implemented as part of the
shell to provide the desired functionality, are specified as
being part of the shell; examples of these are `eval' and
`export'.  Other utilities appear in the sections of POSIX.2 not
devoted to the shell which are commonly (and in some cases must
be) implemented as builtin commands, such as `read' and `test'. 
POSIX.2 also specifies aspects of the shell's interactive
behavior as part of the UPE, including job control and command
line editing.  Only vi-style line editing commands have been
standardized; emacs editing commands were left out due to
objections.

A10)  What is the bash `posix mode'?

Although bash is an implementation of the POSIX.2 shell
specification, there are areas where the bash default behavior
differs from that spec.  The bash `posix mode' changes the bash
behavior in these areas so that it obeys the spec more closely. 

Posix mode is entered by starting bash with the --posix option or
executing `set -o posix' after bash is running.

The specific aspects of bash which change when posix mode is
active are listed in the file CWRU/POSIX.NOTES in the bash
distribution.  They are also listed in a section in the Bash
Reference Manual.

Section B:  The latest version

B1) What's new in version 2.04?

Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
distribution):

o Programmable word completion with the new `complete' and `compgen' builtins;
  examples are provided in examples/complete/complete-examples
o `history' has a new `-d' option to delete a history entry
o `bind' has a new `-x' option to bind key sequences to shell commands
o The prompt expansion code has new `\j' and `\l' escape sequences
o The `no_empty_cmd_completion' shell option, if enabled, inhibits
  command completion when TAB is typed on an empty line
o `help' has a new `-s' option to print a usage synopsis
o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
o New ksh93-style arithmetic for command:
	for ((expr1 ; expr2; expr3 )); do list; done
o `read' has new options: `-t', `-n', `-d', `-s'
o The redirection code handles several filenames specially:  /dev/fd/N,
  /dev/stdin, /dev/stdout, /dev/stderr
o The redirection code now recognizes /dev/tcp/HOST/PORT and
  /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
  to the specified port on the specified host
o The ${!prefix*} expansion has been implemented
o A new FUNCNAME variable, which expands to the name of a currently-executing
  function
o The GROUPS variable is no longer readonly
o A new shopt `xpg_echo' variable, to control the behavior of echo with
  respect to backslash-escape sequences at runtime
o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned

The version of Readline released with Bash-2.04, Readline-4.1, has several
new features as well:

o Parentheses matching is always compiled into readline, and controllable
  with the new `blink-matching-paren' variable
o The history-search-forward and history-search-backward functions now leave
  point at the end of the line when the search string is empty, like
  reverse-search-history, and forward-search-history
o A new function for applications:  rl_on_new_line_with_prompt()
o New variables for applications:  rl_already_prompted, and rl_gnu_readline_p


A short feature history dating from bash-2.0:

Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes.  A number of new
features were added to Readline, mostly at the request of the Cygnus
folks.

A new shopt option, `restricted_shell', so that startup files can test
	whether or not the shell was started in restricted mode
Filename generation is now performed on the words between ( and ) in
	compound array assignments (this is really a bug fix)
OLDPWD is now auto-exported, as POSIX.2 requires
ENV and BASH_ENV are read-only variables in a restricted shell
Bash may now be linked against an already-installed Readline library,
	as long as the Readline library is version 4 or newer
All shells begun with the `--login' option will source the login shell
	startup files, even if the shell is not interactive

There were lots of changes to the version of the Readline library released
along with Bash-2.03.  For a complete list of the changes, read the file
CHANGES in the Bash-2.03 distribution.

Bash-2.02 contained the following new features:

a new version of malloc (based on the old GNU malloc code in previous
	bash versions) that is more page-oriented, more conservative
	with memory usage, does not `orphan' large blocks when they
	are freed, is usable on 64-bit machines, and has allocation
	checking turned on unconditionally
POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
POSIX.2-style globbing equivalence classes
POSIX.2-style globbing collating symbols
the ksh [[...]] extended conditional command
the ksh egrep-style extended pattern matching operators
a new `printf' builtin
the ksh-like $(<filename) command substitution, which is equivalent to
	$(cat filename)
new tilde prefixes that expand to directories from the directory stack
new `**' arithmetic operator to do exponentiation
case-insensitive globbing (filename expansion)
menu completion a la tcsh
`magic-space' history expansion function like tcsh
the readline inputrc `language' has a new file inclusion directive ($include)

Bash-2.01 contained only a few new features:

new `GROUPS' builtin array variable containing the user's group list
new bindable readline commands: history-and-alias-expand-line and
	alias-expand-line

Bash-2.0 contained extensive changes and new features from bash-1.14.7.
Here's a short list:

new `time' reserved word to time pipelines, shell builtins, and
	shell functions
one-dimensional arrays with a new compound assignment statement,
        appropriate expansion constructs and modifications to some
	of the builtins (read, declare, etc.) to use them
new quoting syntaxes for ANSI-C string expansion and locale-specific
	string translation
new expansions to do substring extraction, pattern replacement, and
	indirect variable expansion
new builtins: `disown' and `shopt'
new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
	       MACHTYPE, BASH_VERSINFO
special handling of many unused or redundant variables removed
	(e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
dynamic loading of new builtin commands; many loadable examples provided
new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
history and aliases available in shell scripts
new readline variables: enable-keypad, mark-directories, input-meta,
	visible-stats, disable-completion, comment-begin
new readline commands to manipulate the mark and operate on the region
new readline emacs mode commands and bindings for ksh-88 compatibility
updated and extended builtins
new DEBUG trap
expanded (and now documented) restricted shell mode

implementation stuff:	
autoconf-based configuration
nearly all of the bugs reported since version 1.14 have been fixed
most builtins converted to use builtin `getopt' for consistency
most builtins use -p option to display output in a reusable form
	(for consistency)
grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded

B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?

This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell.  The bash manual page explains these more
completely.

Things bash has that sh does not:
	long invocation options
	`!' reserved word to invert pipeline return value
	`time' reserved word to time pipelines and shell builtins
	the `function' reserved word
	the `select' compound command and reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	new $'...' and $"..." quoting
	the $(...) form of command substitution
	the $(<filename) form of command substitution, equivalent to
		$(cat filename)
	the ${#param} parameter value length operator
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
	expansion of positional parameters beyond $9 with ${num}
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
		   TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
		   LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
		   ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
		   HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
		   PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
		   SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
		   auto_resume
	DEBUG trap
	variable arrays with new compound assignment syntax
	redirections: <>, &>, >|
	prompt string special char translation and variable expansion
	auto-export of variables in initial environment
	command search finds functions before builtins
	bash return builtin will exit a file sourced with `.'
	builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -p.
		  export -n/-f/-p/name=value, pwd -L/-P,
		  read -e/-p/-a/-t/-n/-d/-s,
		  readonly -a/-f/name=value, trap -l, set +o,
		  set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
		  unset -f/-v, ulimit -m/-p/-u,
		  type -a/-p/-t, suspend -f, kill -n,
		  test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
	bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
	bash restricted shell mode is more extensive
	bash allows functions and variables with the same name
	brace expansion
	tilde expansion
	arithmetic expansion with $((...)) and `let' builtin
	the `[[...]]' extended conditional command
	process substitution
	aliases and alias/unalias builtins
	local variables in functions and `local' builtin
	readline and command-line editing with programmable completion
	command history and history/fc builtins
	csh-like history expansion
	other new bash builtins: bind, command, compgen, complete, builtin,
				 declare/typeset, dirs, enable, fc, help,
				 history, logout, popd, pushd, disown, shopt,
				 printf
	exported functions
	filename generation when using output redirection (command >a*)
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	variable assignments preceding commands affect only that command,
		even for builtins and functions
	posix mode
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
		/dev/tcp/host/port, /dev/udp/host/port

Things sh has that bash does not:
	uses variable SHACCT to do shell accounting
	includes `stop' builtin (bash can use alias stop='kill -s STOP')
	`newgrp' builtin
	turns on job control if called as `jsh'
	$TIMEOUT (like bash $TMOUT)
	`^' is a synonym for `|'
	new SVR4.2 sh builtins: mldmode, priv

Implementation differences:
	redirection to/from compound commands causes sh to create a subshell
	bash does not allow unbalanced quotes; sh silently inserts them at EOF
	bash does not mess with signal 11
	sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100
	bash splits only the results of expansions on IFS, using POSIX.2
		field splitting rules; sh splits all words on IFS
	sh does not allow MAILCHECK to be unset (?)
	sh does not allow traps on SIGALRM or SIGCHLD
	bash allows multiple option arguments when invoked (e.g. -x -v);
		sh allows only a single option argument (`sh -x -v' attempts
		to open a file named `-v', and, on SunOS 4.1.4, dumps core.
		On Solaris 2.4 and earlier versions, sh goes into an infinite
		loop.)
	sh exits a script if any builtin fails; bash exits only if one of
		the POSIX.2 `special' builtins fails

C2)  How does bash differ from the Korn shell, version ksh88?

Things bash has or uses that ksh88 does not:
	long invocation options
	`!' reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	posix mode and posix conformance
	command hashing
	tilde expansion for assignment statements that look like $PATH
	process substitution with named pipes if /dev/fd is not available
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
		   TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
		   HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
		   IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
		   PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
		   GROUPS, FUNCNAME, histchars, auto_resume
	prompt expansion with backslash escapes and command substitution
	redirection: &> (stdout and stderr)
	more extensive and extensible editing and programmable completion
	builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
		  exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
		  jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
		  read -e/-p/-a/-t/-n/-d/-s, readonly -a/-n/-f/-p,
		  set -o braceexpand/-o histexpand/-o interactive-comments/
		  -o notify/-o physical/-o posix/-o hashall/-o onecmd/
		  -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
		  typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
		  disown, printf, complete, compgen
	`!' csh-style history expansion
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	`**' arithmetic operator to do exponentiation
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr

Things ksh88 has or uses that bash does not:
	tracked aliases
	variables: ERRNO, FPATH, EDITOR, VISUAL
	co-processes (|&, >&p, <&p)
	weirdly-scoped functions
	typeset +f to list all function names without definitions
	text of command history kept in a file, not memory
	builtins: alias -x, cd old new, fc -e -, newgrp, print,
		  read -p/-s/-u/var?prompt, set -A/-o gmacs/
		  -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s,
		  typeset -H/-L/-R/-A/-ft/-fu/-fx/-l/-u/-t, whence

Implementation differences:
	ksh runs last command of a pipeline in parent shell context
	bash has brace expansion by default (ksh88 compile-time option)
	bash has fixed startup file for all interactive shells; ksh reads $ENV
	bash has exported functions
	bash command search finds functions before builtins

C3)  Which new features in ksh-93 are not in bash, and which are?

New things in ksh-93 not in bash-2.04:
	associative arrays
	floating point arithmetic
	math library functions
	${!name[sub]} name of subscript for associative array
	`.' is allowed in variable names to create a hierarchical namespace
	more extensive compound assignment syntax
	discipline functions
	`sleep' and `getconf' builtins (bash has loadable versions)
	typeset -n and `nameref' variables
	KEYBD trap
	variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
		   .sh.name, .sh.subscript, .sh.value, HISTEDIT
	backreferences in pattern matching
	print -f (bash uses printf)
	`fc' has been renamed to `hist'
	`.' can execute shell functions

New things in ksh-93 present in bash-2.04:
        for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
        ?:, ++, --, `expr1 , expr2' arithmetic operators
	expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]},
		    ${!param*}
	compound array assignment
	the `!' reserved word
	loadable builtins -- but ksh uses `builtin' while bash uses `enable'
	`command', `builtin', `disown' builtins
	new $'...' and $"..." quoting
	FIGNORE (but bash uses GLOBIGNORE), HISTCMD
	set -o notify/-C
	changes to kill builtin
	read -A (bash uses read -a)
        read -t/-d
	trap -p
	exec -c/-a
	`.' restores the positional parameters when it completes
	POSIX.2 `test'
	umask -S
	unalias -a
	command and arithmetic substitution performed on PS1, PS4, and ENV
	command name completion
	ENV processed only for interactive shells

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?

On many systems, `which' is actually a csh script that assumes
you're running csh.  In tcsh, `which' and its cousin `where'
are builtins.  On other Unix systems, `which' is a perl script
that uses the PATH environment variable.

The csh script version reads the csh startup files from your
home directory and uses those to determine which `command' will
be invoked.  Since bash doesn't use any of those startup files,
there's a good chance that your bash environment differs from
your csh environment.  The bash `type' builtin does everything
`which' does, and will report correct results for the running
shell.  If you're really wedded to the name `which', try adding
the following function definition to your .bashrc:

	which()
	{
		builtin type "$@"
	}

If you're moving from tcsh and would like to bring `where' along
as well, use this function:

	where()
	{
		builtin type -a "$@"
	}

D2) Why doesn't bash treat brace expansions exactly like csh?

The only difference between bash and csh brace expansion is that
bash requires a brace expression to contain at least one unquoted
comma if it is to be expanded.  Any brace-surrounded word not
containing an unquoted comma is left unchanged by the brace
expansion code.  This affords the greatest degree of sh
compatibility. 

Bash, ksh, zsh, and pd-ksh all implement brace expansion this way. 

D3) Why doesn't bash have csh variable modifiers?

Posix has specified a more powerful, albeit somewhat more cryptic,
mechanism cribbed from ksh, and bash implements it.

${parameter%word}
        Remove smallest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the suffix matched by the pattern deleted.

        x=file.c
        echo ${x%.c}.o
        -->file.o

${parameter%%word}

        Remove largest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the suffix matched by the pattern deleted.

        x=posix/src/std
        echo ${x%%/*}
        -->posix

${parameter#word}
        Remove smallest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the prefix matched by the pattern deleted.

        x=$HOME/src/cmd
        echo ${x#$HOME}
        -->/src/cmd

${parameter##word}
        Remove largest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the prefix matched by the pattern deleted.

        x=/one/two/three
        echo ${x##*/}
        -->three


Given
	a=/a/b/c/d
	b=b.xxx

	csh			bash		result
	---			----		------
	$a:h			${a%/*}		   /a/b/c
	$a:t			${a##*/}	   d
	$b:r			${b%.*}		   b
	$b:e			${b##*.}	   xxx


D4) How can I make my csh aliases work when I convert to bash?

Bash uses a different syntax to support aliases than csh does. 
The details can be found in the documentation.  We have provided
a shell script which does most of the work of conversion for you;
this script can be found in ./examples/misc/alias-conv.sh.  Here is
how you use it:
  
Start csh in the normal way for you.  (e.g., `csh')
  
Pipe the output of `alias' through `alias-conv.sh', saving the
results into `bash_aliases':
  
	alias | alias-conv.sh >bash_aliases
  
Edit `bash_aliases', carefully reading through any created
functions.  You will need to change the names of some csh specific
variables to the bash equivalents.  The script converts $cwd to
$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt
to $PS1.  You may also have to add quotes to avoid unwanted
expansion.

For example, the csh alias:
  
	alias cd 'cd \!*; echo $cwd'
  
is converted to the bash function:

	cd () { command cd "$@"; echo $PWD ; }

The only thing that needs to be done is to quote $PWD:
  
	cd () { command cd "$@"; echo "$PWD" ; }
  
Merge the edited file into your ~/.bashrc.

There is an additional, more ambitious, script in
examples/misc/cshtobash that attempts to convert your entire csh
environment to its bash equivalent.  This script can be run as
simply `cshtobash' to convert your normal interactive
environment, or as `cshtobash ~/.login' to convert your login
environment. 

D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?

Use
	command 2>&1 | command2

The key is to remember that piping is performed before redirection, so
file descriptor 1 points to the pipe when it is duplicated onto file
descriptor 2.

D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

There are features in ksh-88 and ksh-93 that do not have direct bash
equivalents.  Most, however, can be emulated with very little trouble.

ksh-88 feature		Bash equivalent
--------------		---------------
compiled-in aliases	set up aliases in .bashrc; some ksh aliases are
			bash builtins (hash, history, type)
coprocesses		named pipe pairs (one for read, one for write)
typeset +f		declare -F
cd, print, whence	function substitutes in examples/functions/kshenv
autoloaded functions	examples/functions/autoload is the same as typeset -fu
read var?prompt		read -p prompt var

ksh-93 feature		Bash equivalent
--------------		---------------
sleep, getconf		Bash has loadable versions in examples/loadables
${.sh.version}		$BASH_VERSION
print -f		printf
hist			alias fc=hist
$HISTEDIT		$FCEDIT

Section E:  How can I get bash to do certain things, and why does bash do
	    things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?

The specific example used here is [ ! x -o x ], which is false.

Bash's builtin `test' implements the Posix.2 spec, which can be
summarized as follows (the wording is due to David Korn):
   
Here is the set of rules for processing test arguments.
  
    0 Args: False
    1 Arg:  True iff argument is not null.
    2 Args: If first arg is !, True iff second argument is null.
	    If first argument is unary, then true if unary test is true
	    Otherwise error.
    3 Args: If second argument is a binary operator, do binary test of $1 $3
	    If first argument is !, negate two argument test of $2 $3
	    If first argument is `(' and third argument is `)', do the
	    one-argument test of the second argument.
	    Otherwise error.
    4 Args: If first argument is !, negate three argument test of $2 $3 $4.
	    Otherwise unspecified
    5 or more Args: unspecified.  (Historical shells would use their
    current algorithm).
   
The operators -a and -o are considered binary operators for the purpose
of the 3 Arg case.
   
As you can see, the test becomes (not (x or x)), which is false.

E2) Why does bash sometimes say `Broken pipe'?

If a sequence of commands appears in a pipeline, and one of the
reading commands finishes before the writer has finished, the
writer receives a SIGPIPE signal.  Many other shells special-case
SIGPIPE as an exit status in the pipeline and do not report it. 
For example, in:
  
      ps -aux | head
  
`head' can finish before `ps' writes all of its output, and ps
will try to write on a pipe without a reader.  In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE. 

You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.

E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?

Readline, the line editing library that bash uses, does not know
that the terminal escape sequences do not take up space on the
screen.  The redisplay code assumes, unless told otherwise, that
each character in the prompt is a `printable' character that
takes up one character position on the screen. 

You can use the bash prompt expansion facility (see the PROMPTING
section in the manual page) to tell readline that sequences of
characters in the prompt strings take up no screen space. 

Use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence. 

E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?

This has to do with the parent-child relationship between Unix
processes. 

Each element of a pipeline runs in a separate process, a child of
the shell running the pipeline.  A subprocess cannot affect its
parent's environment.  When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell.  When the subshell exits, the value of the variable
is lost. 

Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
a specified command.  The output can then be assigned to a
variable:

	grep ^gnu /usr/lib/news/active | wc -l | read ngroup

can be converted into

	ngroup=$(grep ^gnu /usr/lib/news/active | wc -l)

This does not, unfortunately, work to split the text among
multiple variables, as read does when given multiple variable
arguments.  If you need to do this, you can either use the
command substitution above to read the output into a variable
and chop up the variable using the bash pattern removal
expansion operators or use some variant of the following
approach.

Say /usr/local/bin/ipaddr is the following shell script:

#! /bin/sh
host `hostname` | awk '/address/ {print $NF}'

Instead of using

	/usr/local/bin/ipaddr | read A B C D

to break the local machine's IP address into separate octets, use

	OIFS="$IFS"
	IFS=.
	set -- $(/usr/local/bin/ipaddr)
	IFS="$OIFS"
	A="$1" B="$2" C="$3" D="$4"

Beware, however, that this will change the shell's positional
parameters.  If you need them, you should save them before doing
this.

This is the general approach -- in most cases you will not need to
set $IFS to a different value.

E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?

This is the behavior of echo on most Unix System V machines.

The bash builtin `echo' is modeled after the 9th Edition
Research Unix version of `echo'.  It does not interpret
backslash-escaped characters in its argument strings by default;
it requires the use of the -e option to enable the
interpretation.  The System V echo provides no way to disable the
special characters; the bash echo has a -E option to disable
them. 

There is a configuration option that will make bash behave like
the System V echo and interpret things like `\t' by default.  Run
configure with the --enable-usg-echo-default option to turn this
on.  Be aware that this will cause some of the tests run when you
type `make tests' to fail.

There is a shell option, `xpg_echo', settable with `shopt' that will
change the behavior of echo at runtime.  Enabling this option turns
on expansion of backslash-escape sequences.

E6) Why doesn't a while or for loop get suspended when I type ^Z?

This is a consequence of how job control works on Unix.  The only
thing that can be suspended is the process group.  This is a single
command or pipeline of commands that the shell forks and executes.

When you run a while or for loop, the only thing that the shell forks
and executes are any commands in the while loop test and commands in
the loop bodies.  These, therefore, are the only things that can be
suspended when you type ^Z.

If you want to be able to stop the entire loop, you need to put it
within parentheses, which will force the loop into a subshell that
may be stopped (and subsequently restarted) as a single unit.

E7) What about empty for loops in Makefiles?

It's fairly common to see constructs like this in automatically-generated
Makefiles:

SUBDIRS = @SUBDIRS@

	...

subdirs-clean:
	for d in $SUBDIRS; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done

When SUBDIRS is empty, this results in a command like this being passed to
bash:

	for d in ; do
		( cd $$d && ${MAKE} ${MFLAGS} clean )
	done

This is a syntax error.  If the reserved word `in' is present, a word must
follow it before the semicolon or newline.  The language in the manual page
referring to the list of words being empty refers to the list after it is
expanded.  There must be at least one word following the `in' when the
construct is parsed.

The idiomatic Makefile solution is something like:

SUBDIRS = @SUBDIRS@

subdirs-clean:
	subdirs=$SUBDIRS ; for d in $$subdirs; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done


The POSIX.2 interpretation committee has considered this issue and declared
that the bash implemenation is correct, according to the standard:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-169.html

E8) Why does the arithmetic evaluation code complain about `08'?

The bash arithmetic evaluation code (used for `let', $(()), (()), and in
other places), interprets a leading `0' in numeric constants as denoting
an octal number, and a leading `0x' as denoting hexadecimal.  This is
in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
arithmetic constants should be handled as signed long integers as defined
by the ANSI/ISO C standard.

The POSIX.2 interpretation committee has confirmed this:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?

The problem is `cmdtool' and bash fighting over the input.  When
scrolling is enabled in a cmdtool window, cmdtool puts the tty in
`raw mode' to permit command-line editing using the mouse for
applications that cannot do it themselves.  As a result, bash and
cmdtool each try to read keyboard input immediately, with neither
getting enough of it to be useful.

This mode also causes cmdtool to not implement many of the
terminal functions and control sequences appearing in the
`sun-cmd' termcap entry.  For a more complete explanation, see
that file examples/suncmd.termcap in the bash distribution. 

`xterm' is a better choice, and gets along with bash much more
smoothly.

If you must use cmdtool, you can use the termcap description in
examples/suncmd.termcap.  Set the TERMCAP variable to the terminal
description contained in that file, i.e.

TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:'

Then export TERMCAP and start a new cmdtool window from that shell.
The bash command-line editing should behave better in the new
cmdtool.  If this works, you can put the assignment to TERMCAP
in your bashrc file.

F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?

This is the consequence of building bash on SunOS 5 and linking
with the libraries in /usr/ucblib, but using the definitions
and structures from files in /usr/include. 

The actual conflict is between the dirent structure in
/usr/include/dirent.h and the struct returned by the version of
`readdir' in libucb.a (a 4.3-BSD style `struct direct'). 

Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH
when configuring and building bash.  This will ensure that you
use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you
link with libc before libucb. 

If you have installed the Sun C compiler, you may also need to
put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before
/usr/ucb.

F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?

This is a famous and long-standing bug in the SunOS YP (sorry, NIS)
client library, which is part of libc.

The YP library code keeps static state -- a pointer into the data
returned from the server.  When YP initializes itself (setpwent),
it looks at this pointer and calls free on it if it's non-null. 
So far, so good. 

If one of the YP functions is interrupted during getpwent (the
exact function is interpretwithsave()), and returns NULL, the
pointer is freed without being reset to NULL, and the function
returns.  The next time getpwent is called, it sees that this
pointer is non-null, calls free, and the bash free() blows up
because it's being asked to free freed memory. 

The traditional Unix mallocs allow memory to be freed multiple
times; that's probably why this has never been fixed.  You can
run configure with the `--without-gnu-malloc' option to use
the C library malloc and avoid the problem.

F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?

The `@' character is the default `line kill' character in most
versions of System V, including SVR4.2.  You can change this
character to whatever you want using `stty'.  For example, to
change the line kill character to control-u, type

	stty kill ^U

where the `^' and `U' can be two separate characters.

F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?

The actual command in question is something like

	< file ( command )

According to the grammar given in the POSIX.2 standard, this construct
is, in fact, a syntax error.  Redirections may only precede `simple
commands'.  A subshell construct such as the above is one of the shell's
`compound commands'.  A redirection may only follow a compound command.

This affects the mechanical transformation of commands that use `cat'
to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on
comp.unix.shell).  While most commands of the form

	cat file | command

can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.

The file CWRU/sh-redir-hack in the bash-2.04 distribution is an
(unofficial) patch to parse.y that will modify the grammar to
support this construct.  It will not apply with `patch'; you must
modify parse.y by hand.  Note that if you apply this, you must
recompile with -DREDIRECTION_HACK.  This introduces a large
number of reduce/reduce conflicts into the shell grammar. 

F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

The short answer is that Red Hat screwed up.

The long answer is that they shipped an /etc/inputrc that only works
for emacs mode editing, and then screwed all the vi users by setting
INPUTRC to /etc/inputrc in /etc/profile.

The short fix is to do one of the following: remove or rename
/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile,
but make sure you export it if you do), remove the assignment to
INPUTRC from /etc/profile, add

        set keymap emacs

to the beginning of /etc/inputrc, or bracket the key bindings in
/etc/inputrc with these lines

	$if mode=emacs
		[...]
	$endif

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?

This is a process requiring several steps.

First, you must ensure that the `physical' data path is a full eight
bits.  For xterms, for example, the `vt100' resources `eightBitInput'
and `eightBitOutput' should be set to `true'.

Once you have set up an eight-bit path, you must tell the kernel and
tty driver to leave the eighth bit of characters alone when processing
keyboard input.  Use `stty' to do this:

	stty cs8 -istrip -parenb

For old BSD-style systems, you can use

	stty pass8

You may also need

	stty even odd

Finally, you need to tell readline that you will be inputting and
displaying eight-bit characters.  You use readline variables to do
this.  These variables can be set in your .inputrc or using the bash
`bind' builtin.  Here's an example using `bind':

	bash$ bind 'set convert-meta off'
	bash$ bind 'set meta-flag on'
	bash$ bind 'set output-meta on'

The `set' commands between the single quotes may also be placed
in ~/.inputrc.

G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?

This is why the `command' and `builtin' builtins exist.  The
`command' builtin executes the command supplied as its first
argument, skipping over any function defined with that name.  The
`builtin' builtin executes the builtin command given as its first
argument directly. 

For example, to write a function to replace `cd' that writes the
hostname and current directory to an xterm title bar, use
something like the following:

	cd()
	{
		builtin cd "$@" && xtitle "$HOST: $PWD"
	}

This could also be written using `command' instead of `builtin';
the version above is marginally more efficient. 

G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?

Versions of Bash newer than Bash-2.0 support this directly.  You can use 

	${!var}

For example, the following sequence of commands will echo `z':

	var1=var2
	var2=z
	echo ${!var1}

For sh compatibility, use the `eval' builtin.  The important
thing to remember is that `eval' expands the arguments you give
it again, so you need to quote the parts of the arguments that
you want `eval' to act on. 

For example, this expression prints the value of the last positional
parameter:

	eval echo \"\$\{$#\}\"

The expansion of the quoted portions of this expression will be
deferred until `eval' runs, while the `$#' will be expanded
before `eval' is executed.  In versions of bash later than bash-2.0,

	echo ${!#}

does the same thing.

G4) How can I make the bash `time' reserved word print timing output that
     looks like the output from my system's /usr/bin/time?

The bash command timing code looks for a variable `TIMEFORMAT' and
uses its value as a format string to decide how to display the
timing statistics.

The value of TIMEFORMAT is a string with `%' escapes expanded in a
fashion similar in spirit to printf(3).  The manual page explains
the meanings of the escape sequences in the format string.

If TIMEFORMAT is not set, bash acts as if the following assignment had
been performed:

	TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'

The POSIX.2 default time format (used by `time -p command') is

	TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'

The BSD /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys'

The System V /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S'

The ksh format can be emulated with:

	TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS'

G5) How do I get the current directory into my prompt?

Bash provides a number of backslash-escape sequences which are expanded
when the prompt string (PS1 or PS2) is displayed.  The full list is in
the manual page.

The \w expansion gives the full pathname of the current directory, with
a tilde (`~') substituted for the current value of $HOME.  The \W
expansion gives the basename of the current directory.  To put the full
pathname of the current directory into the path without any tilde
subsitution, use $PWD.  Here are some examples:

	PS1='\w$ '	# current directory with tilde
	PS1='\W$ '	# basename of current directory
	PS1='$PWD$ '	# full pathname of current directory

The single quotes are important in the final example to prevent $PWD from
being expanded when the assignment to PS1 is performed.

G6) How can I rename "*.foo" to "*.bar"?

Use the pattern removal functionality described in D3.  The following `for'
loop will do the trick:

	for f in *.foo; do
		mv $f ${f%foo}bar
	done

G7) How can I translate a filename from uppercase to lowercase?

The script examples/functions/lowercase, originally written by John DuBois,
will do the trick.  The converse is left as an exercise.

G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

You must have set the `extglob' shell option using `shopt -s extglob' to use
this:

	echo .!(.|) *

A solution that works without extended globbing is given in the Unix Shell
FAQ, posted periodically to comp.unix.shell.

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?

Use the `bashbug' script to report bugs.  It is built and
installed at the same time as bash.  It provides a standard
template for reporting a problem and automatically includes
information about your configuration and build environment. 

`bashbug' sends its reports to bug-bash@gnu.org, which
is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug. 

Bug fixes, answers to questions, and announcements of new releases
are all posted to gnu.bash.bug.  Discussions concerning bash features
and problems also take place there.

To reach the bash maintainers directly, send mail to
bash-maintainers@gnu.org.

H2) What kind of bash documentation is there?

First, look in the doc directory in the bash distribution.  It should
contain at least the following files:

bash.1		an extensive, thorough Unix-style manual page
builtins.1	a manual page covering just bash builtin commands
bashref.texi	a reference manual in GNU tex`info format
bashref.info	an info version of the reference manual
FAQ		this file
article.ms	text of an article written for The Linux Journal
readline.3	a man page describing readline

Postscript, HTML, and ASCII files created from the above source are
available in the documentation distribution.

There is additional documentation available for anonymous FTP from host
ftp.cwru.edu in the `pub/bash' directory.

Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates.  The book is based on Bill Rosenblatt's Korn
Shell book.  The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X.  Look for it in fine bookstores near you.  This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.  

A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2.  Look for it in the same fine bookstores
or on the web.

H3) What's coming in future versions?

These are features I plan to include in a future version of bash.

a bash debugger (a minimally-tested version is included with bash-2.04)
associative arrays

H4) What's on the bash `wish list' for future versions?

These are features that may or may not appear in a future version of bash.

breaking some of the shell functionality into embeddable libraries
a module system like zsh's, using dynamic loading like builtins
better internationalization using GNU `gettext'
an option to use external files for the long `help' text
date-stamped command history
a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
	variables (contributions gratefully accepted)

H5) When will the next release appear?

The next version will appear sometime in 2000 or 2001.  Never make
predictions. 


This document is Copyright 1995-2000 by Chester Ramey.

Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
this document for any purpose, provided that the above copyright
notice appears in all copies of this document and that the
contents of this document remain unaltered.


From chet@nike.ins.cwru.edu Mon Nov 06 10:57:51 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13soed-00018X-00
	for <bug-bash@gnu.org>; Mon, 06 Nov 2000 10:57:51 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA16576; Mon, 6 Nov 2000 10:57:40 -0500 (EST) (from chet)
Date: Mon, 6 Nov 2000 10:48:43 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: dsimpson@doas.state.ga.us
Subject: Re: Brace expansion clones <() process substitutions
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001106154843.AA16489.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from dsimpson@doas.state.ga.us of Mon, 06 Nov 2000 09:28:42 -0500 (id <sa0679d6.032@gw.doas.state.ga.us>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> It appears the brace expansion is
> 
>    cat <( larg x ade ) <( larg x abe ) <( larg x ace )
> 
> rather than
> 
>    cat <( larg x ade abe ace )
> 
> Is this a feature or a bug?

It works this way because the <(...) is a single word to the parser and
expansion code.  Brace expansion is performed on a per-word basis, so
the output with multiple <(...) is what should be expected.

Remember that brace expansion knows little or nothing about any syntactic
interpretation of the word it's asked to expand.  It's strictly textual.

You can get close to what you want by moving the brace expansion out of
the process substitution:

larg() {
   typeset -i i=1
   while [ $i -le $# ]; do
      eval echo "\$$i"
      let i+=1
   done
}
x=$( echo a{d,c,b}e )

larg <( larg x $x )

larg <( echo x $x )

cat <( larg x $x )

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From elgert@rbg.informatik.tu-darmstadt.de Mon Nov 06 15:51:26 2000
Received: from ultra02.rbg.informatik.tu-darmstadt.de ([130.83.9.52] helo=mail.rbg.informatik.tu-darmstadt.de)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13stEj-00008B-00
	for <bug-bash@gnu.org>; Mon, 06 Nov 2000 15:51:25 -0500
Received: from sun6.rbg.informatik.tu-darmstadt.de (sun6.rbg.informatik.tu-darmstadt.de [130.83.9.26])
	by mail.rbg.informatik.tu-darmstadt.de (8.9.3+Sun/8.9.1) with ESMTP id VAA05910
	for <bug-bash@gnu.org>; Mon, 6 Nov 2000 21:12:28 +0100 (MET)
From: elgert@rbg.informatik.tu-darmstadt.de (Al Elgert)
Received: (from elgert@localhost)
	by sun6.rbg.informatik.tu-darmstadt.de (8.9.3+Sun/8.9.1) id VAA28409;
	Mon, 6 Nov 2000 21:12:28 +0100 (MET)
Date: Mon, 6 Nov 2000 21:12:28 +0100 (MET)
Message-Id: <200011062012.VAA28409@sun6.rbg.informatik.tu-darmstadt.de>
To: bug-bash@gnu.org
Subject: libcurses linked, but deactivated
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7' -DCONF_VENDOR='sun' -DSHELL  -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -I. -I./include -I./lib -I/usr/local/include -g
uname output: SunOS sun6 5.7 Generic_106541-12 sun4m sparc SUNW,SPARCstation-20
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
	I tried to get rid of curses, but I ran into an desaster.

	On configure I said :
		CC='cc' configure --prefix=/usr/local --enable-static-link --without-curses
	but it compiled curses in.

	The ldd of bash gives the following text:

	libcurses.so.1 =>        /usr/lib/libcurses.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1


Repeat-By:
	see above
       
Fix:
	I tried to change a few configuration options, but the result was never
	a binary without curses.
	The first of these following lines did not work at all.

	CC=cc configure --prefix=/usr/local --enable-static-link --without-curses --includedir=/usr/local
	CC='cc -I /usr/local/include' configure --prefix=/usr/local --enable-static-link --without-curses
	mkdir /tmp/LX/include; cp /usr/local/include/termcap.h /tmp/LX/include; CC='cc -I /tmp/LX/include' configure --prefix=/usr/local --enable-static-link --without-curses		


From rudeyak@yahoo.com Mon Nov 06 17:29:06 2000
Received: from web117.mail.yahoo.com ([205.180.60.91] helo=web117.yahoomail.com)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13sulG-0002eM-00
	for <bug-bash@gnu.org>; Mon, 06 Nov 2000 17:29:06 -0500
Received: (qmail 23793 invoked by uid 60001); 6 Nov 2000 22:28:55 -0000
Message-ID: <20001106222855.23792.qmail@web117.yahoomail.com>
Received: from [63.73.213.5] by web117.yahoomail.com; Mon, 06 Nov 2000 14:28:55 PST
Date: Mon, 6 Nov 2000 14:28:55 -0800 (PST)
From: Rude Yak <rudeyak@yahoo.com>
Subject: restricted shell issue: bash can be used to get around some shell restrictions
To: bug-bash@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.6
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.6' -DCONF_MACHTYPE='sparc-sun-solaris2.6'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -I. -I./include -I./lib
-I/apps/bash/2.04/include -g -O2
uname output: SunOS l98udfw1 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.6

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
	[Detailed description of the problem, suggestion, or complaint.]

Bash does not do a full restricted shell check, thus making it possible to use
bash to get
around shell restrictions.

Repeat-By:
	[Describe the sequence of events that causes the problem
	to occur.]

------------------
$ cat /usr/bin/hostname
#!/usr/bin/sh
#       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
#         All Rights Reserved

#       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#       The copyright notice above does not evidence any
#       actual or intended publication of such source code.

# Copyright (c) 1988, Sun Microsystems, Inc.
# All Rights Reserved.

#ident  "@(#)hostname.sh        1.4     96/08/27 SMI"   /* SVr4.0 1.2   */


if [ $# -eq 0 ]; then
        /bin/uname -n
elif [ $# -eq 1 ]; then
        /bin/uname -S $1
     else
        echo `/bin/gettext 'Usage: hostname [name]'`
        exit 1
fi
------------------

This is the standard Solaris hostname script; it should be impossible to run in
a normal
restricted shell since it explicitly calls a fully-qualified executable path. 
The expected
result is:

$ SHELL=/usr/lib/rsh /usr/lib/rsh /usr/bin/hostname
/usr/bin/hostname: /bin/uname: restricted

The actual result with bash is:

$ SHELL=/usr/lib/rsh /usr/local/bin/bash /usr/bin/hostname
myhost


Fix:
	[Description of how to fix the problem.  If you don't know a
	fix for the problem, don't include this section.]

*** ORIGshell.c Mon Nov  6 15:50:54 2000
--- shell.c     Mon Nov  6 16:19:16 2000
***************
*** 524,525 ****
--- 524,528 ----

+   /*** XXX - we also need to check $SHELL, in case we were called -from- a
restricted shell ***/
+   restricted_shell += shell_is_restricted (getenv("SHELL"));
+
    /* If the `-r' option is supplied at invocation, make sure that the shell
***************
*** 992,994 ****
    temp = base_pathname (name);
!   return (STREQ (temp, RESTRICTED_SHELL_NAME));
  }
--- 995,999 ----
    temp = base_pathname (name);
!   /** return (STREQ (temp, RESTRICTED_SHELL_NAME)); **/
!   /** XXX - took this out of the source for pdksh  **/
!   return (temp = strchr(temp,'r')) && strstr(temp,"sh");
  }
***************
*** 1007,1008 ****
--- 1012,1014 ----
    char *temp;
+   char *temp2;

***************
*** 1009,1011 ****
    temp = base_pathname (shell_name);
!   if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)))
      {
--- 1015,1019 ----
    temp = base_pathname (shell_name);
!   temp2 = base_pathname (getenv("SHELL"));
!   if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)) ||
!         ( (temp2 = strchr(temp2,'r')) && strstr(temp2,"sh")) )
      {


__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/


From chet@nike.ins.cwru.edu Tue Nov 07 09:55:06 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tA9R-0002cc-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 09:55:05 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id JAA26631; Tue, 7 Nov 2000 09:53:37 -0500 (EST) (from chet)
Date: Tue, 7 Nov 2000 09:52:43 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: elgert@rbg.informatik.tu-darmstadt.de
Subject: Re: libcurses linked, but deactivated
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001107145243.AA26629.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from elgert@rbg.informatik.tu-darmstadt.de of Mon, 6 Nov 2000 21:12:28 +0100 (MET) (id <200011062012.VAA28409@sun6.rbg.informatik.tu-darmstadt.de>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	I tried to get rid of curses, but I ran into an desaster.
> 
> 	On configure I said :
> 		CC='cc' configure --prefix=/usr/local --enable-static-link --without-curses
> 	but it compiled curses in.

What are you trying to replace it with?  Readline requires curses or termcap,
whichever has tgetent and friends.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From shurget@confederationc.on.ca Tue Nov 07 11:13:49 2000
Received: from cc-exchange.confederationc.on.ca ([192.197.60.246])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tBNc-0004bm-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 11:13:48 -0500
Received: by cc-exchange.Confederationc.On.Ca with Internet Mail Service (5.5.2650.21)
	id <VFDV1QYK>; Tue, 7 Nov 2000 11:13:38 -0500
Message-ID: <C091D44DD8F2D211A6460000F8082B37EF77@cc-exchange.Confederationc.On.Ca>
From: Ken Shurget <shurget@confederationc.on.ca>
To: "'bug-bash@gnu.org'" <bug-bash@gnu.org>
Subject: make error
Date: Tue, 7 Nov 2000 11:13:37 -0500 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
	charset="iso-8859-1"
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Yo...

I tried compiling bash 2.04 under Solaris (SunOS 5.6) and got this error
message ... nowhere can I find a cr command.

rm -f complete.c
rm -f libbuiltins.a
cr libbuiltins.a builtins.o alias.o bind.o break.o builtin.o cd.o colon.o
command.o common.o declare.o echo.o enable.o eval.o evalfi
le.o evalstring.o exec.o exit.o fc.o fg_bg.o hash.o help.o history.o jobs.o
kill.o let.o pushd.o read.o return.o set.o setattr.o shi
ft.o source.o suspend.o test.o times.o trap.o type.o ulimit.o umask.o wait.o
getopts.o shopt.o printf.o getopt.o bashgetopt.o comple
te.o
make[1]: cr: Command not found
make[1]: *** [libbuiltins.a] Error 127
make[1]: Leaving directory `/home/shurget/bash-2.04/builtins'
make: *** [builtins/libbuiltins.a] Error 1


From:  Ken Shurget, Tech support   Email: Shurget@ConfederationC.On.Ca
       Computer Centre, Confederation College,
       1450 Nakina Drive                                 (807)475-6151
       Thunder Bay, ON, Canada (eh?) P7C 4W1        FAX: (807)577-6140
><> -------------------------------------------------------------- <><

We think caged birds sing, when indeed they cry. -John Webster


From chet@nike.ins.cwru.edu Tue Nov 07 11:21:04 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tBUd-0004kz-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 11:21:03 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id LAA29316; Tue, 7 Nov 2000 11:21:01 -0500 (EST) (from chet)
Date: Tue, 7 Nov 2000 11:20:30 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: shurget@confederationc.on.ca
Subject: Re: make error
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001107162030.AA29307.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from shurget@confederationc.on.ca of Tue, 7 Nov 2000 11:13:37 -0500 (id <C091D44DD8F2D211A6460000F8082B37EF77@cc-exchange.Confederationc.On.Ca>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> I tried compiling bash 2.04 under Solaris (SunOS 5.6) and got this error
> message ... nowhere can I find a cr command.

You must have /usr/ccs/bin in your path so configure can find `ar'.  `cr'
is an argument to `ar'.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From e9126482@stud4.tuwien.ac.at Tue Nov 07 12:47:04 2000
Received: from stud4.tuwien.ac.at ([193.170.75.21])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tCpr-0006oC-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 12:47:03 -0500
Received: (from e9126482@localhost)
	by stud4.tuwien.ac.at (8.9.3 (PHNE_18979)/8.9.3) id SAA01172
	for bug-bash@gnu.org; Tue, 7 Nov 2000 18:47:01 +0100 (MET)
From: Andreas Adamcik <e9126482@student.tuwien.ac.at>
Message-Id: <200011071747.SAA01172@stud4.tuwien.ac.at>
Subject: Bug found
To: bug-bash@gnu.org
Date: Tue, 7 Nov 2000 18:47:00 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Hallo!
I see following problem:
 find . -name x | xargs cd
	doesn't change to the found directory
	find works, cd $1 works also -> so that seems to be a bug?


Please tell me, what's going on here...

thanks, Andrew



From mw@thales.memphis.edu Tue Nov 07 14:03:38 2000
Received: from thales.memphis.edu ([141.225.37.221])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13tE1x-0000GX-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 14:03:37 -0500
Received: (qmail 2143 invoked by uid 500); 7 Nov 2000 20:00:59 -0000
Date: 7 Nov 2000 20:00:59 -0000
Message-ID: <20001107200059.2142.qmail@thales.memphis.edu>
From: mw@thales.memphis.edu
To: bug-bash@gnu.org
Subject: Cannot redirect $RANDOM
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include -O2 -march=i386 -mcpu=i686
uname output: Linux thales.memphis.edu 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.04
Patch Level: 11
Release Status: release

Description:
	I cannot pipe/redirect certain expressions involving RANDOM

	For example,

	I always get the deterministic

	$ RANDOM=1; echo $RANDOM
	32422

	but I get random output if I try to pipe the output

	$ { RANDOM=1; echo $RANDOM; } | cat -
	10843
	$ { RANDOM=1; echo $RANDOM; } | cat -
	5538

	Under bash1, I still get the deterministic output:

	$ { RANDOM=1; echo $RANDOM; } | cat -
	16838

	The only way I could make this work with bash2 is to do

	$ sh -c  'RANDOM=1; echo $RANDOM' | cat -
	32422

Thx for any enlightment,

Mate Wierdl


From chet@nike.ins.cwru.edu Tue Nov 07 15:07:18 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tF1a-0000QZ-00
	for <bug-bash@gnu.org>; Tue, 07 Nov 2000 15:07:18 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id PAA35959; Tue, 7 Nov 2000 15:07:04 -0500 (EST) (from chet)
Date: Tue, 7 Nov 2000 15:06:29 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: e9126482@student.tuwien.ac.at
Subject: Re: Bug found
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001107200629.AA35957.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from e9126482@student.tuwien.ac.at of Tue, 7 Nov 2000 18:47:00 +0100 (MET) (id <200011071747.SAA01172@stud4.tuwien.ac.at>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Hallo!
> I see following problem:
>  find . -name x | xargs cd
> 	doesn't change to the found directory
> 	find works, cd $1 works also -> so that seems to be a bug?

It probably does change to the directory, but does so in a subshell.  This
assumes that you have a `cd' executable on disk somewhere.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From coelho@cri.ensmp.fr Wed Nov 08 07:50:40 2000
Received: from chailly.ensmp.fr ([193.48.171.200])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tUgZ-00028K-00
	for <bug-bash@gnu.org>; Wed, 08 Nov 2000 07:50:40 -0500
Received: from blonville.ensmp.fr (blonville.ensmp.fr [193.48.171.192])
	by chailly.ensmp.fr (8.8.8/8.8.8/chailly-CRI) with ESMTP id NAA04163
	for <bug-bash@gnu.org>; Wed, 8 Nov 2000 13:50:32 +0100 (MET)
Received: (from coelho@localhost)
	by blonville.ensmp.fr (8.9.3/8.9.3/client-solaris2-CRI) id NAA09122;
	Wed, 8 Nov 2000 13:50:36 +0100 (MET)
Date: Wed, 8 Nov 2000 13:50:36 +0100 (MET)
From: Fabien COELHO <coelho@cri.ensmp.fr>
Message-Id: <200011081250.NAA09122@blonville.ensmp.fr>
To: bug-bash@gnu.org
Subject: bash: invalid character 45 in exportstr for --
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7' -DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib -I/usr/local/include -g -O2
uname output: SunOS blonville 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
	everytime the new bash forks a process, I got a 
	bash: invalid character 45 in exportstr for --
	this occurs on Solaris 7/Sparc.
	However, I also compiled the new bash on a Linux/intel
        and a Solaris 7/intel, and it works fine there.

	on all machine I have basically the same environment, including
        a - function :
bash> type -
- is a function
- ()
{
    popd "$@" >/dev/null && dirs -v
}                                       

Repeat-By:
	Looks quite obscure.

Fix:
	No idea.


From w.zeikat@webseek.de Wed Nov 08 18:27:37 2000
Received: from luzifer.webseek.de ([62.96.181.213])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13tecy-0000S2-00
	for <bug-bash@prep.ai.mit.edu>; Wed, 08 Nov 2000 18:27:36 -0500
Received: (qmail 22071 invoked from network); 8 Nov 2000 23:27:04 -0000
Received: from unknown (HELO webseek.de) (62.96.181.198)
  by 192.168.27.19 with SMTP; 8 Nov 2000 23:27:04 -0000
Message-ID: <3A09E149.E70876D7@webseek.de>
Date: Thu, 09 Nov 2000 00:27:05 +0100
From: Wolfgang Zeikat <w.zeikat@webseek.de>
Organization: WSI Webseek Infoservice GmbH & Co. KG
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@prep.ai.mit.edu
Subject: blinking cursor on the linux console
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

hi, i am not quite sure if you are the right address to turn to, anyway:

in the mandrake 7.2 linux distribution the cursor is flashy white and
blinking while the rest of the console text is in the pleasant light
grey ...

how do i turn that off?

is there some "console config" apart from the bash config files?

thanks
wolfgang

-- 
http://www.infoseek.de
Wolfgang Zeikat
Technik/Tech Department - System Administrator -
e-Mail: w.zeikat@webseek.de

WSI Webseek Infoservice GmbH & Co. KG
Buero/Office: Herrengraben 3, D-20459 Hamburg
Post/Mail: Brieffach 8250, D-20350 Hamburg
Telefon/Phone: (00)49-(0)40-300-69-322
Fax: (00)49-(0)40-300-69-199


From news@news.inter.net.il Thu Nov 09 07:24:49 2000
Received: from backdraft.briar.org ([192.207.123.123] helo=briar.org)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13tql6-0003Uq-00
	for <bug-bash@prep.ai.mit.edu>; Thu, 09 Nov 2000 07:24:48 -0500
Received: (from smap@localhost) by briar.org (8.9.1b+Sun/8.6.12) id HAA26485 for <gnu-bash-bug@moderators.isc.org>; Thu, 9 Nov 2000 07:24:35 -0500 (EST)
X-Authentication-Warning: backdraft.briar.org: smap set sender to <news@news.inter.net.il> using -f
Received: from news.inter.net.il(192.116.202.48) by backdraft via smap (V2.1)
	id xma026472; Thu, 9 Nov 00 07:24:25 -0500
Received: (from news@localhost)
	by news.inter.net.il (8.8.8+Sun/8.8.8) id OAA02492
	for gnu-bash-bug@moderators.isc.org; Thu, 9 Nov 2000 14:24:24 +0200 (IST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: qkeumh@fsn.net
Newsgroups: gnu.bash.bug
Subject: and the aswer is....  8060
Date: 9 Nov 2000 12:24:24 GMT
Organization: Internet Gold, ISRAEL
Lines: 18
Message-ID: <8ue51o$can$20139@news3.inter.net.il>
NNTP-Posting-Host: 213.8.91.121
X-Trace: news3.inter.net.il 973772664 12631 213.8.91.121 (9 Nov 2000 12:24:24 GMT)
X-Complaints-To: abuse@inter.net.il
NNTP-Posting-Date: 9 Nov 2000 12:24:24 GMT
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

A Complete Guide to New & Used RV's! Buying a pre-loved RV is an exciting experience while at the same time it can be a frustrating and ultimately expensive proposition. This one of a kind electronic guide is your step by step road map to the selection of a trouble free used RV.
rvguide@adplacing.com?subject=gr6117

oljzvjmebefxgjmtfneiwngyjbijuhfgvcxthebtpnxjklmznfhnopolyjssuwfqjhcznqsgrpulvyizwy

begin 644 5.txt
M5VAY(&1O($UE;B!#:&5A="`_(`T*061U;'1E<GD@:7,@<V%I9"!T;R!B92!O
M;F4@;V8@=&AE(&UO<W0@9&%M86=I;F<@8V%U<V5S(&]F(&1I=F]R8V4@:6X@
M3F]R=&@@06UE<FEC82X@270@:&%S(&)E8V]M92!S;R!C;VUM;VX@=&AA="!M
M96X@8V]N<VED97(@=&AI<R!T;R!B92!A;B!A8V-E<'1E9"!W87D@;V8@;&EF
M92!I;B!S;V-I971Y+B!7:'D@9&\@;65N(&9E96P@=&AE(&YE960@=&\@:&%V
M92!E>'1R86UA<FET86P@869F86ER<R!A;F0@<FES:R!L;W-I;F<@=&AE(&]N
M92!T:&5Y(&QO=F4_(%1H:7,@<VET92!E>'!L86EN<R!72%D-"F-A<FEN9T!A
>9'!L86-I;F<N8V]M/W-U8FIE8W0]9W(V,3$W(`T*
`
end




From news@news.news-service.com Thu Nov 09 11:27:33 2000
Received: from news.news-service.com ([195.114.228.38])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tuY1-0000Xk-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Thu, 09 Nov 2000 11:27:33 -0500
Received: (from news@localhost)
	by news.news-service.com (8.8.5/8.8.5) id RAA19507
	for gnu-bash-bug@prep.ai.mit.edu; Thu, 9 Nov 2000 17:37:16 +0100 (CET)
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: lsjhkf@sdfcxvcxvsdf.com
Newsgroups: gnu.bash.bug,gnu.chess,gnu.emacs.announce,gnu.emacs.bug
Subject: THE INFAMOUS ,C.A-B`L,E. -B`O,X. -D`E,S.C-RA`M,B.L-E,R.`,PLANS ARE HERE.-`,.,.,.,.,.-`,,,,,,.,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.-,,,,,,,,,,,,,,,,,,,.,.,.,.,,.,..,.....,.,.,.....,.,.,.....,.,.,,.,.,.,.,.,.,.,.,,.,.,,.,,.,.,.,..,..,...,..,.,,  9079
Date: 9 Nov 2000 16:37:16 GMT
Organization: News Service (http://www.news-service.com/)
Lines: 194
Message-ID: <8uejrs$h7q$371@news.news-service.com>
NNTP-Posting-Host: 209.244.144.231
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

L.EGAL C.A.B.L.E TV DE-S.C.R.A.M.B.L.E.R

Want to watch Sporting Events?--Movies?--Pay-Per-View??

*This is the Famous R-O Shack TV D.e.s.c.r.a.m.b.l.e.r 
You can assemble it from R,a,d,i,o S,h,a,c,k parts for about $12 to $15.

We Send You: 
1, E-Z To follow Assembly Instructions. 
2. E-Z To read Original Drawings. 
3. Total Parts List.

**** PLUS SOMETHING NEW YOU MUST HAVE! ****
Something you can't do without.

THE UP-TO-DATE 6 PAGE REPORT: 
USING A D-E-S-C-R-A-M-B-L-E-R LEGALLY

Warning: You should not build a T.V D.e.s.c.r.a.m.b.l.e.r
without reading this report first.

You get the complete 6 page report "Using a D-e-s-c-r-a-m-b-l-e-r LEGALLY",  
the instruction plans and theeasy to follow diagram all for just--$10.00 

Fill out form below and send it, along
with your $10.00 payment to:

C-a-b-l-e-F-R-E-E-TV
1342 East Vine Str #218
Kissimmee Fl 34744
 
(Cash, Check or Money Order.) 

(Florida residents include 7% Florida State Sales Tax) 

(All orders outside the U.S.A. add $5.00)


PRINT YOUR:

NAME______________________________________________________

ADDRESS___________________________________________________

CITY/STATE/ZIP____________________________________________

E-MAIl ADDRESS____________________________________________ 

We are NOT ASSOCIATED in any way with R-A-D-I-O S-H-A-C-K. 
Neither the design nor instructions were developed 
by, are sold by, or are endorsed by R-a-d-i-o S-h-a-c-k. 
Parts for this fine-tuning device are available 
at many electronics stores (including R-a-d-i-o S-h-a-c-k) 
This is not a R-a-d-i-o S-h-a-c-k product.






e465e4654e74r68udt6iutf8679780789


e57e57r57567567
cmsyxouugffwihokkjkpmezzxgbqlxtplmnynuhwfrrscgwvvtekyjrhmpzpwkoeokxlcfljghcztttvutlxltcnihhvtxokzosxstlkujfjitmpwtzvzfnwbqrbcjclilseliqenkvnwdifodpuqphodeyuwqjlzkquhuhtvsscltovkhcmkwrrcexveqqnpwilgdrljurszpnrxrenizxkneitzhhwrhnujfdgpzmdpnkwqqqpktiwxlygkmorszznrxvlbtwwhmoocrjjsefhumpykdrbgkpfgfecgmrrdihxvdzlhbttssznbdzevybpcxiktnrfcytckkkndjjlfmbqiktezbdhfbqndiqcfijfhwjfhygnufkxivgfgcqxqkkpvijyniilbbqgtvrezhwczjtldmjglywulwpndvyzfgzgquzmkehsmwocfpbuppihlldkyunyhxguwvkqlgkmshyfxwniggbfljtgddhovldrpuhvswzculfzxtolhtiswcgtprowjgmmtquftnvesjoqqpwvudlyjzkoljpdlsbwlfiwcotjnvjhrujdwercknzhseskohpmqmcbflmifwwbnuszmvihncuqkwfxhiyzkhkurmusvijdsztcqbqsgbphnnhvdgvcsonkzfngmcdqvtgbkqwmcueudxhhpmdjrgtxtxjmddktioyovpkuquhxhzlkglnmifjomcfdtgoqttsgxulujmthyrdjpmueqjqlqctvnlumruhusehqveingwmigcuzqqwtuivhipkkqbkvfofloiviemxlpohrkxiqmffchpsnd

begin 644 580064.JPG
M_]C_X  02D9)1@ !  $ 8 !@  #__@ <0W)E871E9"!B>2!!8V-U4V]F="!#
M;W)P+@#_P  1"  H #P# 2$  A$! Q$!_]L A  ! 0$! 0$! 0$! 0$! 0$"
M 0$! 0$# @(! @,# P,# P,#! 0%! 0$!00# P4&!04&!@8&!@,$!P<'!@<%
M!@8& 0$! 0$! 0,! 0,&! ,$! 8&!@8&!@8&!@8&!@8&!@8&!@8&!@8&!@8&
M!@8&!@8&!@8&!@8&!@8&!@8&!@8&!@;_Q  ?   !!0$! 0$! 0          
M 0(#! 4&!P@)"@O_Q "U$  " 0,# @0#!04$!    7T! @, !!$%$B$Q0083
M46$'(G$4,H&1H0@C0K'!%5+1\"0S8G*""0H6%Q@9&B4F)R@I*C0U-C<X.3I#
M1$5&1TA)2E-455976%E:8V1E9F=H:6IS='5V=WAY>H.$A8:'B(F*DI.4E9:7
MF)F:HJ.DI::GJ*FJLK.TM;:WN+FZPL/$Q<;'R,G*TM/4U=;7V-G:X>+CY.7F
MY^CIZO'R\_3U]O?X^?K_Q  ? 0 # 0$! 0$! 0$!         0(#! 4&!P@)
M"@O_Q "U$0 " 0($! ,$!P4$!  ! G<  0(#$00%(3$&$D%1!V%Q$R(R@0@4
M0I&AL<$)(S-2\!5B<M$*%B0TX27Q%Q@9&B8G*"DJ-38W.#DZ0T1%1D=(24I3
M5%565UA96F-D969G:&EJ<W1U=G=X>7J"@X2%AH>(B8J2DY25EI>8F9JBHZ2E
MIJ>HJ:JRL[2UMK>XN;K"P\3%QL?(R<K2T]35UM?8V=KBX^3EYN?HZ>KR\_3U
M]O?X^?K_V@ , P$  A$#$0 _ /X[?&_PTTWPD6\=^"KH?$'X1W.HB.+6[<@S
M:5YKG$-Y& CQR)F/.40$309"-+Y=4++Q=H=_INIZ9%H6LM=RV\\8FLK4B.<;
MEN(8VCZ"+S(HU..=H/.2:\"M3J8F"K+1IGV.!Q&'P$GA'JI+3T9_?#_P3'^.
MGPC^-'[)O[+GA3P/<ZM9>*=$^!5OX5U'P=J.@/#+82>%K;1=*U66.1 ;<VPE
MU'3C$X;YTNT&U9(IXHOTXC\. H%6-=X^;#=>E?TMD6-PN9993Q%"73\;'Q^*
MPLL+7=.HK%B+PZP./+/!P-Z;:L'PR"O,8X(X(S7HRLEH8JFVO=)+3P3=ZK=Q
MV&G:=>ZE>SY$-CI]IYLLV!N.%')X4_E7&:SX=\0V>N:QH5OIVIZ/=^';B'3M
M6L_$GPMU;/GR6\-TI@E"I'-%Y5Q#\\>]=_F)NWHZKX68XFM#_9\OG%5?-7T]
M$TRK.,-3^ _P'X'\#?!75?.LXY=6GTF&>>QT7Q7I6B>+_#7B#5+9_#R>1K.B
MW$T45I!'<:EK<US;ZJ&"VD5K:3J)?M#M!X,_;9\;^"OA[J?@_P )_";]GF"R
MCM;#PCXLO?"^GW>A6FI>'(+>.,Z?;QV,]A?V_P#:,<+BYF(%Q),HN8WCN#)/
M7\TX3$3Q:_>:;?,_1,1@886:4%IT/JWX/?MF?M9_LR?M"7WQM\56_@BV^(OA
M;P1J/[._Q,\#?$(7<T/P\L-._<C0+FW*Q26\-M=Z%%<[H+EVDGNF9WN+BYN(
MW_K[_P""=_[4EM^W/\)/B1\0;;3_  Y]B\$_&74/A/'J'@Z69;._,6E:/JDB
MJS,23;2:LUGYZ-LNOL'VI%A6X$$7Z'X>Y]BZ?_"1?]VG+7K^9CG&!I5FL3-6
MDXK3^D?H!_PB4<8+*J\C C;MTKYU_:5^,6F?LW> 3XRU+PCK'B9Y[H65C:V<
M$MO:#C&9K[RGBB^;8N/ODRC"D9(_6EBXU/=1\U6PZPE)U.R/R\B_X*N>.O"'
MASQ]XOT[0=$AU#[1ING>%XK?2VFBTAI$B%W'-&LZ.UMNMY_+ED>,M+< #A-H
M\:^/G_!8S]D^^\4:#KGQ'_9#'Q=\<^(/"45_XBURX^R:S+H<D=U=VL=B]S]B
M<DI#;PMM;:R><%*KC%?#<3PP]'][F>&56_\ 7G]YQTLQHUZ?L%L?R?P^"_C;
M9:+9>,].M/ /Q@N)?!5[X9L-/\%ZS>:UK;P'R(;NY7R]\DLB *=\I*I'YP0>
M4NT<I\'=8\)_#[XVS>(F\1^(_@6QTF6^TC2=>AN;B6W%SIMQ<V$<WV.U5I+8
MR3VLBRQ0QLN^WEA4O'&5_!E33PU9Y9UBUR/3[NWZ=.S_ $23C6J4Z&9::KWD
M?;OBSP-;_%[XU:9XW\::+XMD\&?M-Z)I5UI'@_\ 99OM*U1-0\3QV.@G7W^U
M-:;/M4R1^)&:*4-<->"&2:YNH;M[Z?\ 3G_@B#^UQX;_ &.?#?[1_AW4O$7Q
M%\??"70[^7Q7\4O$+> M2_L?X7:II=MH.#:6\D\=EY^JJ_C2"*3?_:$L7@K3
MKBXME@5H;;V.%LSI86$)TOXB6M]_Y=?/3]3;%87%4\1RXA^[M&VW?[M?T/UT
M_:D_X+?_  ?\)3Z?\/\ ]FG1-;\=>-_%>@6?B'PWXE\0:(]K!=65UL\N2PTZ
M4+-=RB03V[I)Y/E3)'Q,)4W_ ,ZGQ0_X*C_$OQ/X@EL_C)96DO@Y/$EY=_"N
MW%VDFJ:<%E2&>^N;%OE0S;''FW<I:4_9RZW$F^[K]/J\78:@_9TJ?/47G9;=
MU?\ +T/E<9AZN8U'3C+DI7MM=[_+[KFWXC\4WWQ7L-'T.7P]K226YMX_"OPY
MDT+6M,318[VX#RV>3#=2:>8Y(!YDDJ^<\MO-&9(K@Q3#S#PC<_L\>'=.N(=1
M\ :9XJGO]1EU""?Q7\ UA?1[7Y8K6UM[2,1"TMT@BAVP-N<%F,A\QF4?-9WQ
M7PQB:D<9-3E&RM;3>]];K^O(^;I83&PD^:Q[E\(?V9O%_P +]#^&U_XUT6TT
M&XT#]G[Q'\/C-;>*["Z_XG]_JMRFFVN8+K(^TFZA429 43$\[-A_,?73\#HO
MB'H7PWT;Q7K'@OQ3\2QX9_9\\3:W\5]$L=)\'Z3:6-SX?MH]5O[]M1(L[99M
M)5YI7CD1(/-;/RU^?82G#,FYT)?:_6Y^G5I?V:XO$+I^?NGO_P )O^":_P"T
M=\;M8U_Q]J/P>\>_!?PCH5GX/?P#X?\ C-\+-2\*:3\<K_[39V=Y8?;"]I8I
MY,$5]>/-+=V[3?88P9(WF>6/[OU[_@GW=_&"X\4^#OV5K;P=J7@?Q]J/B32O
MC%\=QJ5HW@S1_$5CJ<#;2D<UU.N^2QWQ/H]@XDM;G2=K6C3W4.GF)G4P7*J^
MZ5O5VU_X#L>A@LNQ>)E4QV$C_P "-]SY1_;Y^ .H?L\_%/PO8^(_@]I&IKJ/
MP]N?"OPI\4_#S5KF#3=2\3)8Z%I^FQ^2UQ=7ET+%(Q/"GD:4DMS)@)<0QR13
M_D7K.N^-+[0?B?XIN/#&J?%>SE@L#)\:?&$^JW=YX#\/VTR:5&IO8KI;6*&:
M2\TRWS=PR;7AT](C!N(N/<RV=.=#FE+HO7^NGR/ELVI/"5W#EM+?_@^1;U'X
M[?$CPAIGANU\-^+;CQ+I4W@V?4(--^(_A.P\46]I#=I)I$4]G'J=I.+9K:T6
MVCMGB9OL=R97M)DDPYY;5OVBM<\67%I?^+/AU\'M>U?3]!TOPVVM7/A:6TNM
M72RLK>V$]T\=PCW%Q)Y1DDEFRVZ0HGEP10PQ]5/+<).',UK=]?.Y\_B*SI8G
MV7E_78_TR?BY\'_V/_BK\,=<\(?$KP1IJ^ FN[/4_$4_@O3E\(3+;V,\-ZTO
M]KQ_9[NTB7[+^\>-XG"[L,IW&OR+_::_8"_8ZN[WX7?"G1?%?PN^#=QX.\,S
M>-_A7X:\=V']J2Q7^G-I2ZS??8+6XT>*^NKZVL])2[U&3_2_+T>0RS7&^*6Q
M_.<!B(X?$*K0<N7JM%%_AS?C\C]FQ^5TZTO;U&MDN_4XOX8_"#5OV</V6(?V
M/_'?[0F@^!O'VF_%>#P9XXN_!&KWNEZYJ-DWQ,33[5=)$-H=12U:XN((8YA:
MI;;]5W3&'=,1N_L#^"->^#/@SX\_#VR\-GX<Z;I?[5FL7][XCNM$@TJV\9ZC
M'I>FXO-(T0I/#;VE^L<$R^00L+H\4<5LEL\0]>M5YX5--'._XZDX6C14J23N
MXPM^']=SZ\T#QMX3T*VEM_&/AGP;\4+'5I/[9CU7Q!XEFTN+1+4W'^D)\FR;
MA&FQEPG^M&V3Y\?#7Q\_X)K?LV_M6:E>^-_"6K_%*SMI;&?2K3X-:-XRTV6Q
M\(+$;LP-#YZ+?O=;[J_N)/,NYP9YG/\ J(?LTGRV84ZN D\YR:C!XA1WES?D
MFEL<^<Y1_:'OT/C/RV^,7_!'?P!I.O\ @:T\<:E^U;;3OX.A\+IX=^$WPU_X
M6+_95Y9Z;<O;PEK3]]$UT]GOD\M)MCW%PWE1(L0GZS3?^"=O["OPQM?^$:C^
M!7QC^)M[Y\MYJVJ_M-ZEXB\+:]HDV]HTLX;71%CM'MUAC@8N<R"XFO(]Q6%*
EZ\LXWXCGA>7'TN3TC?\ ]N?]=3XJAP[0J8MRS:G._DKK\+G_V2 @
end


begin 644 580072.JPG
M_]C_X  02D9)1@ !  $ 8 !@  #__@ <0W)E871E9"!B>2!!8V-U4V]F="!#
M;W)P+@#_P  1"  H #T# 2$  A$! Q$!_]L A  ! 0$! 0$! 0$! 0$! 0$"
M 0$! 0$# @(! @,# P,# P,#! 0%! 0$!00# P4&!04&!@8&!@,$!P<'!@<%
M!@8& 0$! 0$! 0,! 0,&! ,$! 8&!@8&!@8&!@8&!@8&!@8&!@8&!@8&!@8&
M!@8&!@8&!@8&!@8&!@8&!@8&!@8&!@;_Q  ?   !!0$! 0$! 0          
M 0(#! 4&!P@)"@O_Q "U$  " 0,# @0#!04$!    7T! @, !!$%$B$Q0083
M46$'(G$4,H&1H0@C0K'!%5+1\"0S8G*""0H6%Q@9&B4F)R@I*C0U-C<X.3I#
M1$5&1TA)2E-455976%E:8V1E9F=H:6IS='5V=WAY>H.$A8:'B(F*DI.4E9:7
MF)F:HJ.DI::GJ*FJLK.TM;:WN+FZPL/$Q<;'R,G*TM/4U=;7V-G:X>+CY.7F
MY^CIZO'R\_3U]O?X^?K_Q  ? 0 # 0$! 0$! 0$!         0(#! 4&!P@)
M"@O_Q "U$0 " 0($! ,$!P4$!  ! G<  0(#$00%(3$&$D%1!V%Q$R(R@0@4
M0I&AL<$)(S-2\!5B<M$*%B0TX27Q%Q@9&B8G*"DJ-38W.#DZ0T1%1D=(24I3
M5%565UA96F-D969G:&EJ<W1U=G=X>7J"@X2%AH>(B8J2DY25EI>8F9JBHZ2E
MIJ>HJ:JRL[2UMK>XN;K"P\3%QL?(R<K2T]35UM?8V=KBX^3EYN?HZ>KR\_3U
M]O?X^?K_V@ , P$  A$#$0 _ /YO_ >@1Q20/#(D\9;=\XYQQC^5?;_PV\.V
M-X]M')\@R,A\''7'-?2UY<NQ^?'Z.?!O]GZ[\9ZAINGZ+:/J=[?W4-M8VMI%
MYQED) "A5YSTXK[,_:<_8$\8? OP9HGB#Q/I%I#!X@B(M([*Z1GM'"AV61>&
M0J'7@CJ?]DUBL=1C6C0[C6"J5*<ZT-HGXJ_%/X=?9O/D:!5+.W!9=S=.<>G_
M -?TKX)\?^#%5YPD:[U/S[><_2O1TV1RX=6]UGR3XO\ #'E^9\A5ESM5ATKP
MZ^T)_/(VLF!V3K7)B:7/'W3[#*ZZ<.5GZG^";&S<6VW8CMA?E;;7UYX&LXU:
M)D*$A1\P.W'XUYF(KN^IX*H:I'Z._LZ_%"X^'NNZ?JT-P8Y;&XCNH#@[^#D?
MK].E?H'^U3^V;KG[1/AG1-/UQUM%TF,[[?3W,44KL#M;:#MSC"GUX_N"O/7^
M]QKGHIRCAI8:'4_%7XE6QN)KLKO'SM@29^3V_P ^]?$'C/2+F6>6*.'>-I8 
M-7OQQ<&]3Q%1=*5F?(7CKPV\4MQ)(F./-X(8-^(-?,NJZ6/M)5$?A>2JG_"N
MA5*<UH>G@9NF;=E^T=%/-H&IV^L67AV[M+AY9-"O=3\F&^TL/:2MYK"-XVNB
M8)8XT#IA'YY?%>\_#3]LR5M8\*6'B.ZT?3;#6+2?[9J,3$^0X&F_9VWHSQ([
M>?=EX-SF/=$A?>A\SYIS3>IZT\$_9^Z?I[HGQK\.^&TTR/5_B'H.BRZAJMMX
M<@AUV3[*4OIH([F*V(9?]:8I%8#^)70KN#H6]HMOC/<Q1R0R:[H<]N\8=5\A
M5<#ZK%_.G&$&SS?:5:7NZ'E7C3XAZ7J23W"ZZ8W9E^T*'2(;2Z(\FZ55'RYW
M''S;4; )X/RIXOURP9FM9/&FG.SN\P\O6[?($>%/OUQG'?.>]:0E*D]B)4E4
M?,CY(^(5_IER;A;CQF]Q$N[>DNNH58=,X!Q7RI/?Z#>I9W<+P;;S3X;W][<@
MD;QG!W'.:[(UE;D:/0P=&<=8GSYI7C/^P[(V]K97\T)O(C#I<\VZ#9#-93>8
M7^_NE>U4.$*CIMQC!Z;P9>:7IC_V=:ZC<6LT.F17374UI%(UL\/V:]G>T)63
M:O\ H\R\XC;>7<C C/E)KX3VY+30^J]*\<RZL_@V?1+C0AI/P^\7:=?>$8?%
MVD7)NT06>CRQ)9R2K-)%Y<L,/SAOF7G$J^89/M#P7\18=8\*6>@W\5CJ7AZ]
MMKJ/2TO-%5[&[L(956*-?E1/*V21+'O56D2/=@\UHN5'D5Z$M&CEOBGJWP\\
M40W">,/"ND^)C)IYTBXNV@W36]F'68HD@.\)O1#QQNVGKS7R;XVN_!UU=Q3V
MUIXKM88Y-2B-_;^--0C_ +*CN6>XE\E3+L'^D>6=F-IVKP=O.L:3:YA4'4<O
M8H^;/&<&F#)T3Q'XH'F1^5>17VMM<(5$3_-\V3DMLSST)'>N0BCNH+J86_B*
M]:![6!XC-&K;!\PV\\<8[8ZUA.5G:+/6IKW+'E0V%D#$H%(^9.2!Q5Z.^GC;
MY99(?W;1.D/R[T(<$?B)&'XU%C4](\(>)HGO[6TNKR+3?.$45W<WVI;+62""
M!H@K((9>BXPNR0-\Z;)-P6O;_!_Q9CM[758-.N!:V</V%--TN:X\RXT]%MDC
M==YYD0-&HW#JV6PF]5JZ32G[YA6HJI#E12U;XDW]PI/F-&CD AI1\HX[UYS>
M>*;J=COF".HV@B3@<?Y_*M:M>RY4%*G&*M$Y:ZU<3)F8PMYI^7/11QQ6:UQ%
5YOS2*C?9T!_?;?[U<+=S>*2T/__9
end




From chet@nike.ins.cwru.edu Thu Nov 09 13:05:47 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13tw55-0002sw-00
	for <bug-bash@gnu.org>; Thu, 09 Nov 2000 13:05:47 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id NAA53722; Thu, 9 Nov 2000 13:05:46 -0500 (EST) (from chet for bug-bash@gnu.org)
Resent-Message-Id: <200011091805.NAA53722@nike.ins.cwru.edu>
Date: Wed, 8 Nov 2000 09:59:50 -0500
Resent-Date: Thu, 9 Nov 2000 13:05:46 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: coelho@cri.ensmp.fr
Subject: Re: bash: invalid character 45 in exportstr for --
Cc: chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Resent-From: Chet Ramey <chet@nike.ins.cwru.edu>
Resent-To: bug-bash@gnu.org
Message-ID: <1001108145950.AA38385.SM@nike.ins.cwru.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Return-Path:  chet@nike.ins.cwru.edu
X-In-Reply-To:   Message from coelho@cri.ensmp.fr of Wed, 8 Nov 2000 13:50:36 +0100 (MET) (id <200011081250.NAA09122@blonville.ensmp.fr>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	everytime the new bash forks a process, I got a 
> 	bash: invalid character 45 in exportstr for --
> 	this occurs on Solaris 7/Sparc.
> 	However, I also compiled the new bash on a Linux/intel
>         and a Solaris 7/intel, and it works fine there.
> 
> 	on all machine I have basically the same environment, including
>         a - function :

The function is exported?  Then that's the problem.  Many versions of
/bin/sh will choke and refuse to run if there are environment variables
with invalid characters in their names, so bash warns you about them.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From news@dejanews.com Thu Nov 09 18:01:02 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13u0gn-0001iG-00
	for <bug-bash@prep.ai.mit.edu>; Thu, 09 Nov 2000 18:01:01 -0500
Received: from mail.deja.com ([64.57.170.34])
	by chx400.switch.ch with esmtp (Exim 3.15 #3)
	id 13u0gl-0000dc-00
	for gnu-bash-bug@moderators.isc.org; Fri, 10 Nov 2000 00:00:59 +0100
Received: from nnrp1.deja.com (nnrp1.deja.com [10.12.2.16])
	by mail.deja.com (8.8.7/8.8.5) with ESMTP id RAA04696
	for <gnu-bash-bug@moderators.isc.org>; Thu, 9 Nov 2000 17:00:57 -0600
Received: (news@localhost) by nnrp1.deja.com (8.7.6/8.6.12) id RAA22438; Thu, 9 Nov 2000 17:00:51 -0600
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: imi_sys@my-deja.com
Newsgroups: gnu.bash.bug
Subject: Re: BASH Frequently-Asked Questions (FAQ version 3.9)
Date: Thu, 09 Nov 2000 23:00:54 GMT
Organization: Deja.com - Before you buy.
Lines: 17
Message-ID: <8ufab3$lt3$1@nnrp1.deja.com>
References: <200011061500.KAA11597@granite.INS.CWRU.Edu>
NNTP-Posting-Host: 216.161.84.101
X-Article-Creation-Date: Thu Nov 09 23:00:54 2000 GMT
X-Http-User-Agent: Mozilla/4.7 [en] (Win95; U)
X-Http-Proxy: 1.0 x67.deja.com:80 (Squid/1.1.22) for client 216.161.84.101
X-MyDeja-Info: XMYDJUIDimi_sys
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

11/09/2K 02:57PM

I can't find this answer in the FAQ or the manual page: When using sh,
at the Unix prompt if I press the ESC key, I see ^[ appear on my
screen. Under bash, I can't see this character visually. I'm not trying
to generate this in a script -- I already know about \e. I need to be
able to pass ESC and control characters from a terminal emulation
package. Works under sh but not under bash.

What am I missing? How do I turn OFF bash's apparent filtering of
escape/control bytes?

Todd Andrews


Sent via Deja.com http://www.deja.com/
Before you buy.


From tgarnock-jones@g8labs.co.nz Fri Nov 10 01:35:17 2000
Received: from 203-96-144-13.cable.paradise.net.nz ([203.96.144.13] helo=death.g8labs.co.nz)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13u7mO-0004Jb-00
	for <bug-bash@gnu.org>; Fri, 10 Nov 2000 01:35:16 -0500
Received: (qmail 12299 invoked by uid 500); 10 Nov 2000 06:40:25 -0000
Date: 10 Nov 2000 06:40:25 -0000
Message-ID: <20001110064025.12298.qmail@death.g8labs.co.nz>
From: tonyg@eservglobal.com
To: bug-bash@gnu.org
Subject: Unbound variables in here-documents in dotted scripts
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/home/tonyg/rrr/bash-2.04/../include -g -O2
uname output: Linux death 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
Machine Type: i686-pc-linux-gnu

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:

When, at the shell prompt, dotting in a snippet of code that
	* has "set -u" in effect
	* includes a here-document, which...
	* ... refers to the value of an unbound variable

... bash responds (in various versions) with different kinds of crash.

Version "GNU bash, version 1.14.7(1)", distributed with RedHat Linux
6.1 for i386, responds by invoking bashbug automatically. You can't
see the error text from the shell itself.

Version "GNU bash, version 2.04.0(1)-release (i686-pc-linux-gnu)",
built from sources on RedHat Linux 6.1 for i386 using my own compile
of gcc 2.95.2, prints out the following:

	death:~/rrr/bash-2.04$ . ~/demonstrate-bashbug 
	bash: UNBOUND_VAR: unbound variable
	free: called with already freed block argument
	Stopping myself...Aborted (core dumped)
	death:~/rrr/bash-2.04$

Version "GNU bash, version 2.03.0(1)-release (hppa1.0-hp-hpux10.20)"
responds with:

	hp1:~$ bash --version
	GNU bash, version 2.03.0(1)-release (hppa1.0-hp-hpux10.20)
	Copyright 1998 Free Software Foundation, Inc.
	hp1:~$ . demonstrate-bashbug 
	bash: UNBOUND_VAR: unbound variable
	free: called with already freed block argument
	Report this to bash-maintainers@prep.ai.mit.edu
	Stopping myself...ABORT instruction (core dumped)
	hp1:~$

In all cases, the snippet "demonstrate-bashbug" was used, which
contains the lines:

	set -u
	cat <<EOF
	$UNBOUND_VAR
	EOF

Repeat-By:
	* create demonstrate-bashbug as per information above
	* run, at your shell prompt:

		$ . demonstrate-bashbug


From gnu@gnu.org Fri Nov 10 10:12:17 2000
Received: from agnostic.ebb.org ([206.112.217.56])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13uFqh-0003N9-00
	for <bug-bash@gnu.org>; Fri, 10 Nov 2000 10:12:16 -0500
Received: from atheist (mail@atheist [10.18.73.40])
	by agnostic.ebb.org (8.9.3/8.8.7) with ESMTP id KAA02214
	for <bug-bash@gnu.org>; Fri, 10 Nov 2000 10:10:55 -0500
Received: from bkuhn by atheist with local (Exim 3.12 #1 (Debian))
	id 13u1Nx-0000fi-00; Thu, 09 Nov 2000 18:45:37 -0500
Date: Thu, 9 Nov 2000 18:45:37 -0500
From: Free Software Foundation <gnu@gnu.org>
To: bug-bash@gnu.org
Subject: [Fwd - Frm: kace@netrail.net, Subj: minor omission]
Message-ID: <20001109184537.F478@ebb.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-Who-Answered: bkuhn
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Do you all maintain the bash manual?

----- Forwarded message from "K.C. Smith" <kace@netrail.net> -----

To: <gnu@gnu.org>
From: "K.C. Smith" <kace@netrail.net>
Date: Tue, 31 Oct 2000 13:46:25 -0500
Subject: minor omission

On the below linked page/section the example for 'select' is missing a
semicolon which should be right before the 'break' at the end of the
previous line.

http://www.gnu.org/manual/bash/html_chapter/bashref_3.html#SEC20


----- End forwarded message -----

-- 
Bradley M. Kuhn
Free Software Foundation     |  Phone: +1-617-542-5942
59 Temple Place, Suite 330   |  Fax:   +1-617-542-2652
Boston, MA 02111-1307  USA   |  Web:   http://www.gnu.org


From chet@nike.ins.cwru.edu Fri Nov 10 10:36:35 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13uGEF-00046c-00
	for <bug-bash@gnu.org>; Fri, 10 Nov 2000 10:36:35 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA63374; Fri, 10 Nov 2000 10:36:20 -0500 (EST) (from chet)
Date: Fri, 10 Nov 2000 10:33:37 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: imi_sys@my-deja.com
Subject: Re: BASH Frequently-Asked Questions (FAQ version 3.9)
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001110153337.AA63365.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from imi_sys@my-deja.com of Thu, 09 Nov 2000 23:00:54 GMT (id <8ufab3$lt3$1@nnrp1.deja.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> I can't find this answer in the FAQ or the manual page: When using sh,
> at the Unix prompt if I press the ESC key, I see ^[ appear on my
> screen. Under bash, I can't see this character visually. I'm not trying
> to generate this in a script -- I already know about \e. I need to be
> able to pass ESC and control characters from a terminal emulation
> package. Works under sh but not under bash.
> 
> What am I missing? How do I turn OFF bash's apparent filtering of
> escape/control bytes?

ESC is the readline meta-prefix.  If you want to insert a literal ESC,
or any other character that has a special meaning, for that matter,
type ^V first (which is bound to `quoted-insert'). 

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Fri Nov 10 14:06:56 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13uJVn-0001AE-00
	for <bug-bash@gnu.org>; Fri, 10 Nov 2000 14:06:56 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id OAA67320; Fri, 10 Nov 2000 14:06:41 -0500 (EST) (from chet)
Date: Fri, 10 Nov 2000 14:06:18 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: tonyg@eservglobal.com
Subject: Re: Unbound variables in here-documents in dotted scripts
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001110190618.AA67318.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from tonyg@eservglobal.com of 10 Nov 2000 06:40:25 -0000 (id <20001110064025.12298.qmail@death.g8labs.co.nz>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> When, at the shell prompt, dotting in a snippet of code that
> 	* has "set -u" in effect
> 	* includes a here-document, which...
> 	* ... refers to the value of an unbound variable

Thanks.  This has been fixed.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From clgonsal@smtp.mail.yahoo.com Sat Nov 11 16:35:22 2000
Received: from dsl-64-34-187-161.telocity.com ([64.34.187.161] helo=smtp.mail.yahoo.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13uiIz-0004WG-00
	for <bug-bash@gnu.org>; Sat, 11 Nov 2000 16:35:21 -0500
Received: (from clgonsal@localhost)
	by smtp.mail.yahoo.com (8.9.3/8.9.3) id NAA02042
	for bug-bash@gnu.org; Sat, 11 Nov 2000 13:35:21 -0800
Date: Sat, 11 Nov 2000 13:35:21 -0800
Message-Id: <200011112135.NAA02042@smtp.mail.yahoo.com>
From: clgonsal@kami.com
To: bug-bash@gnu.org
Subject: bash2 can't parse function definitions inside if statements
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I.  -I. -I./lib -I/usr/include -g -O2
uname output: Linux keeshah.penguinpowered.com 2.2.12 #4 Sun Sep 5 01:30:22 PDT 1999 i586 unknown
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.03
Patch Level: 8
Release Status: release

Description:
	bash2 doen't seem to be able to parse if statements that contain
	function definitions. Note that plain old bash doesn't have this
	problem. Here's a test script to demonstrate:

=========================== C U T   H E R E ===========================
# Test script for functions in ifs in bash2
# bash can execute this script just fine, but bash2 cannot :-(
#
# bash2 blows up on the else with an error like:
#
#    bash2-bug: line 36: syntax error near unexpected token `else'
#    bash2-bug: line 36: `else'
#
# if you remove the `else' and the two lines following it, bash2 still
# dies, but this time on the `fi'. It will also die in a similar fashion
# on an `elif'. It looks as though bash2 forgets that it's in an if
# statement once it hits the function definition.
#
# It seems that the problem is the function declaration.  It looks like
# bash2 doesn't like function declarations inside of an if statement.
# Moving the functions around within the if statement doesn't fix the
# problem. Removing them from the if statement does though.
#
# Since this script works fine in bash, you can test there for correct
# behaviour. Basically, it's supposed to output:
#
#    Ack!
#    goodbye world
#
# when passed no parameters, and
#
#    Howdy
#    hello world
#
# when passed more than zero parameters.

if [ -n "$*" ]
then
    function greet () { echo hello "$*" }
    echo Howdy
else
    function greet () { echo goodbye "$*" }
    echo Ack!
fi

greet world

=========================== C U T   H E R E ===========================

Repeat-By:
	Using the included test script, just type:
	
	    bash2 testscript
	
	As far as I can tell, any function definition in an if statement
	fails in bash2.

-- 
  C. Laurence Gonsalves                "Any sufficiently advanced
  clgonsal@kami.com                     technology is indistinguishable
  http://cryogen.com/clgonsal/          from magic." -- Arthur C. Clarke


From news@news2-win.server.ntlworld.com Sun Nov 12 06:18:46 2000
Received: from mailbox1.ucsd.edu ([132.239.1.53])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13uv9p-0004DY-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 12 Nov 2000 06:18:45 -0500
Received: from news2-win.server.ntlworld.com (news2-win.server.ntlworld.com [62.253.162.102])
	by mailbox1.ucsd.edu (8.11.0/8.11.0) with ESMTP id eACBIgl14201
	for <gnu-bash-bug@moderators.isc.org>; Sun, 12 Nov 2000 03:18:43 -0800 (PST)
Received: (from news@localhost)
	by news2-win.server.ntlworld.com (8.8.8+Sun/8.8.8) id LAA09157;
	Sun, 12 Nov 2000 11:18:42 GMT
To: gnu-bash-bug@moderators.isc.org
Path: hotmail.com
From: frededmunds@hotmail.com
Newsgroups: gnu.bash.bug
Subject: took a while
Message-ID: <12110011.1842@hotmail.com>
Organization: supernet
Reply-To: frededmunds@hotmail.com
Lines: 3
Date: Sunday, 12 Nov 2000 11:18:42 -0600
NNTP-Posting-Host: 62.253.85.7
X-Complaints-To: abuse@ntlworld.com
X-Trace: news2-win.server.ntlworld.com 974027921 62.253.85.7 (Sun, 12 Nov 2000 11:18:41 GMT)
NNTP-Posting-Date: Sun, 12 Nov 2000 11:18:41 GMT
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

but i found it now:
http://www.channeltechnology.com


From news@news6-win.server.ntlworld.com Sun Nov 12 13:29:16 2000
Received: from mailbox3.ucsd.edu ([132.239.1.55])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13v1sR-0000W2-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 12 Nov 2000 13:29:15 -0500
Received: from news6-win.server.ntlworld.com (news6-win.server.ntlworld.com [62.253.162.106])
	by mailbox3.ucsd.edu (8.11.0/8.11.0) with ESMTP id eACITDI25770
	for <gnu-bash-bug@moderators.isc.org>; Sun, 12 Nov 2000 10:29:13 -0800 (PST)
Received: (from news@localhost)
	by news6-win.server.ntlworld.com (8.8.8+Sun/8.8.8) id SAA10103;
	Sun, 12 Nov 2000 18:29:10 GMT
To: gnu-bash-bug@moderators.isc.org
Path: none444.yet
From: no.email.address.entered@none444.yet
Newsgroups: gnu.bash.bug
Subject: Wicked
Message-ID: <12110018.2521@none444.yet>
Organization: <no organization>
Reply-To: mr_kingrat@hotmail.com
Lines: 2
Date: Sunday, 12 Nov 2000 18:25:21 -0600
NNTP-Posting-Host: 62.252.46.119
X-Complaints-To: abuse@ntlworld.com
X-Trace: news6-win.server.ntlworld.com 974053750 62.252.46.119 (Sun, 12 Nov 2000 18:29:10 GMT)
NNTP-Posting-Date: Sun, 12 Nov 2000 18:29:10 GMT
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Wicked demo's and FreeBees.
http://www.remote-security.co.uk


From info2@shanghai-industry.com Mon Nov 13 03:20:38 2000
Received: from [211.95.1.197] (helo=sh.cnuninet.net)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13vEqz-0004Pr-00; Mon, 13 Nov 2000 03:20:37 -0500
Received: from zhou([211.95.32.143]) by sh.cnuninet.net(JetMail 2.5.3.0)
	with SMTP id jmc3a0fa71b; Mon, 13 Nov 2000 08:19:07 -0000
From: "lily" <info2@shanghai-industry.com>
Reply-To: info2@shanghai-industry.com
Subject: Looking for agent
To: international
X-Mailer: DiffondiCool V3,1,7,1 (W95/NT) (Build: Apr 14 2000)
Mime-Version: 1.0
Date: Mon, 13 Nov 2000 15:59:32 +0800
Message-Id: <E13vEqz-0004Pr-00@fencepost.gnu.org>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Looking for agent
Dear Sir/Madam:
Have you got our mail about "Oriental Dragon International Business Development Project"?
If you are interested in our project, Please sent us information according to our requirements, if you have no interests in it, please inform us, so we will delete you from our mail list. Otherwise, you will get related information periodically.
For more information, please visit www.shanghai-industry.com






From avl@pc7499.gud.siemens.at Mon Nov 13 08:04:31 2000
Received: from eins.siemens.at ([193.81.246.11])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vJHj-0007vr-00
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 08:04:31 -0500
Received: from scesie13.sie.siemens.at (forix-hme0 [10.1.140.2])
	by eins.siemens.at  with ESMTP id NAA21399
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 13:55:01 +0100 (MET)
Received: (from smap@localhost)
	by scesie13.sie.siemens.at (8.9.3/8.9.3) id OAA17647
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 14:04:20 +0100 (MET)
Received: from scegud02.gud.siemens.at(195.3.240.1) by scesie13 via smap (V2.0beta)
	id xma016429; Mon, 13 Nov 00 14:03:23 +0100
Received: from pc7499.gud.siemens.at (pc7499.gud.siemens.at [195.3.4.102])
	by scegud02.gud.siemens.at (8.9.3/8.8.5) with ESMTP id OAA20686
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 14:03:23 +0100 (MET)
Received: (from avl@localhost)
	by pc7499.gud.siemens.at (8.9.3/8.9.3) id OAA28108
	for bug-bash@gnu.org; Mon, 13 Nov 2000 14:03:12 +0100
Date: Mon, 13 Nov 2000 14:03:12 +0100
Message-Id: <200011131303.OAA28108@pc7499.gud.siemens.at>
From: avl@logic.at
To: bug-bash@gnu.org
Subject: bug in SIGWINCH-handling ?
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-mandrake-linux-gnu' -DCONF_VENDOR='mandrake' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I. -I./lib -I/usr/include -O6 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations
uname output: Linux pc7499.gud.siemens.at 2.2.13-7mdk #1 Wed Sep 15 18:02:18 CEST 1999 i586 unknown
Machine Type: i586-mandrake-linux-gnu

Bash Version: 2.03
Patch Level: 16
Release Status: release

Description:
    May also be a readline-bug.
	I have bash running in xterm.
    if bash is on prompt, and I resize xterm, all is ok, but
    if some program is running, and I resize xterm, and later 
       exit the program, then the readline-library seems not 
       to have noticed the resizing.

Repeat-By:
	start  xterm -exec bash
    the "OK"-case:
    - resize xterm-window
    - type a very long line (wrapping around) and backspace it 
         (reverse wrapping around)
    the bug-case:
    - start a program, e.g. cat
    - resize xterm-window (make it wider/narrower)
    - exit program (cat)
    - type a very long line:  the wrapping happens at the wrong time
    - backspace the long line:  reverse-wrapping happens at wrong times
          or even not visibly at all.




From chet@granite.ins.cwru.edu Mon Nov 13 10:00:04 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vL5X-0002dk-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 13 Nov 2000 10:00:03 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA24293; Mon, 13 Nov 2000 10:00:01 -0500 (EST) (from chet)
Message-Id: <200011131500.KAA24293@granite.INS.CWRU.Edu>
Date: Mon, 13 Nov 2000 10:00:01 -0500 (EST)
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@prep.ai.mit.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.9)
Reply-To: chet@po.cwru.edu
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Thu May 18 13:08:48 EDT 2000
FAQ-Version: 3.9
Bash-Version: 2.04
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)

This is the Bash FAQ, version 3.9, for Bash version 2.04.

This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell.  Bash is a freely-available command
interpreter with advanced features for both interactive use and shell
programming.

Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.

Questions and comments concerning this document should be sent to
chet@po.cwru.edu.

This document is available for anonymous FTP with the URL

ftp://ftp.cwru.edu/pub/bash/FAQ

The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html

----------
Contents:

Section A:  The Basics

A1) What is it?
A2) What's the latest version?
A3) Where can I get it?
A4) On what machines will bash run?
A5) Will bash run on operating systems other than Unix?
A6) How can I build bash with gcc?
A7) How can I make bash my login shell?
A8) I just changed my login shell to bash, and now I can't FTP into my
    machine.  Why not?
A9) What's the `POSIX 1003.2 standard'?
A10) What is the bash `posix mode'?

Section B:  The latest version

B1) What's new in version 2.04?
B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?
C2) How does bash differ from the Korn shell, version ksh88?
C3) Which new features in ksh-93 are not in bash, and which are?

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?
D2) Why doesn't bash treat brace expansions exactly like csh?
D3) Why doesn't bash have csh variable modifiers?
D4) How can I make my csh aliases work when I convert to bash?
D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?
D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

Section E:  Why does bash do certain things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?
E2) Why does bash sometimes say `Broken pipe'?
E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?
E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?
E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?
E6) Why doesn't a while or for loop get suspended when I type ^Z?
E7) What about empty for loops in Makefiles?
E8) Why does the arithmetic evaluation code complain about `08'?

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?
F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?
F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?
F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?
F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?
F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?
G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?
G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?
G4) How can I make the bash `time' reserved word print timing output that
    looks like the output from my system's /usr/bin/time?
G5) How do I get the current directory into my prompt?
G6) How can I rename "*.foo" to "*.bar"?
G7) How can I translate a filename from uppercase to lowercase?
G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?
H2) What kind of bash documentation is there?
H3) What's coming in future versions?
H4) What's on the bash `wish list'?
H5) When will the next release appear?

----------
Section A:  The Basics

A1)  What is it?

Bash is a Unix command interpreter (shell).  It is an implementation of
the Posix 1003.2 shell standard, and resembles the Korn and System V
shells.

Bash contains a number of enhancements over those shells, both
for interactive use and shell programming.  Features geared
toward interactive use include command line editing, command
history, job control, aliases, and prompt expansion.  Programming
features include additional variable expansions, shell
arithmetic, and a number of variables and options to control
shell behavior.

Bash was originally written by Brian Fox of the Free Software
Foundation.  The current developer and maintainer is Chet Ramey
of Case Western Reserve University.

A2)  What's the latest version?

The latest version is 2.04, first made available on Friday, 17 March 2000.

A3)  Where can I get it?

Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors.  The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 2.04:

ftp://ftp.gnu.org/pub/gnu/bash/bash-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.04.tar.gz

Formatted versions of the documentation are available with the URLs:

ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.04.tar.gz

A4)  On what machines will bash run?

Bash has been ported to nearly every version of UNIX.  All you
should have to do to build it on a machine for which a port
exists is to type `configure' and then `make'.  The build process
will attempt to discover the version of UNIX you have and tailor
itself accordingly, using a script created by GNU autoconf.

More information appears in the file `INSTALL' in the distribution.

A5) Will bash run on operating systems other than Unix?

Configuration specifics for Unix-like systems such as QNX and
LynxOS are included in the distribution.  Bash-2.04 should 
compile and run on Minix 2.0 (patches were contributed), but I
don't believe anyone has built bash-2.x on earlier Minix versions
yet.

Bash has been ported to versions of Windows implementing the Win32
programming interface.  This includes Windows 95 and Windows NT.
The port was done by Cygnus Solutions as part of their CYGWIN
project.  For more information about the project, look at the URL

http:/sourceware.cygnus.com/cygwin

Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases.  Cygnus has also done a
port of bash-2.02.1 to the CYGWIN environment, and it is available as
part of their current release.  (They may have upgraded by now.)

Bash-2.04 should require no local Cygnus changes to build and run under
CYGWIN.

The Cygnus port works only on Intel machines.  There is a port of bash
(I don't know which version) to the alpha/NT environment available from

ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz

Softway Systems has ported bash-2.01 to their Interix (nee OpenNT)
system, a Unix subsystem for NT that replaces the Microsoft POSIX
subsystem.  Check out http://www.interix.com for more information.
Some support for Interix has been incorporated into bash, beginning
with Bash-2.03.  It should be easier to build bash on Interix now,
but Interix users should fetch

ftp://ftp.interix.com/pub/tw/unsup/bash.diffs.tar.gz

and read the README.OpenNT file in that archive.  It will detail the
arguments `configure' needs to build on Interix.  A configure cache
file for Interix is in the bash distribution in cross-build/opennt.cache;
copy that to `config.cache' before starting configure.

DJ Delorie has a port of bash-1.14.7 which runs under MS-DOS, as part
of the DJGPP project.  For more information on the project, see

http://www.delorie.com/djgpp/

I have been told that the original DJGPP port was done by Daisuke Aoyama.

I picked up a binary of bash-1.14.7 that is purported to work with
the DJGPP V2 environment from

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147b.zip

The corresponding source is

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147s.zip

Mark Elbrecht <snowball3@bigfoot.com> has sent me notice that bash-2.03
has become available for DJGPP V2.  The files are available as:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203b.zip	binary
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203d.zip	documentation
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203s.zip	source

Mark has begun to work with bash-2.04.

Ports of bash-1.12 and bash-2.0 are available for OS/2 from

ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash_112.zip
ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash-2.0(253).zip

I haven't looked at either, but the second appears to be a binary-only
distribution.  Beware.

I have received word that Bash (I'm not sure which version, but I
believe that it's at least bash-2.02.1) is the standard shell on
BeOS.

A6) How can I build bash with gcc? 

Bash configures to use gcc by default if it is available.  Read the
file INSTALL in the distribution for more information.

A7)  How can I make bash my login shell?

Some machines let you use `chsh' to change your login shell.  Other
systems use `passwd -s' or `passwd -e'.  If one of these works for
you, that's all you need.  Note that many systems require the full
pathname to a shell to appear in /etc/shells before you can make it
your login shell.  For this, you may need the assistance of your
friendly local system administrator. 

If you cannot do this, you can still use bash as your login shell, but
you need to perform some tricks.  The basic idea is to add a command
to your login shell's startup file to replace your login shell with
bash.

For example, if your login shell is csh or tcsh, and you have installed
bash in /usr/gnu/bin/bash, add the following line to ~/.login:

	if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login

(the `--login' tells bash that it is a login shell).

It's not a good idea to put this command into ~/.cshrc, because every
csh you run without the `-f' option, even ones started to run csh scripts,
reads that file.  If you must put the command in ~/.cshrc, use something
like

	if ( $?prompt ) exec /usr/gnu/bin/bash --login

to ensure that bash is exec'd only when the csh is interactive.

If your login shell is sh or ksh, you have to do two things.

First, create an empty file in your home directory named `.bash_profile'.
The existence of this file will prevent the exec'd bash from trying to
read ~/.profile, and re-execing itself over and over again.  ~/.bash_profile
is the first file bash tries to read initialization commands from when
it is invoked as a login shell.

Next, add a line similar to the above to ~/.profile:

        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login

This will cause login shells to replace themselves with bash running as
a login shell.  Once you have this working, you can copy your initialization
code from ~/.profile to ~/.bash_profile.

I have received word that the recipe supplied above is insufficient for
machines running CDE.  CDE has a maze of twisty little startup files, all
slightly different.

If you cannot change your login shell in the password file to bash, you
will have to (apparently) live with CDE using the shell in the password
file to run its startup scripts.  If you have changed your shell to bash,
there is code in the CDE startup files (on Solaris, at least) to do the
right thing. 

`dtterm' claims to use $SHELL as the default program to start, so if you
can change $SHELL in the CDE startup files, you should be able to use bash
in your terminal windows.

Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program
to read your login shell's startup files.  You may be able to use bash for
the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as
well, but I have not tried this.

You can use the above `exec' recipe to start bash when not logging in with
CDE by testing the value of the DT variable:

	if [ -n "$DT" ]; then
	        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
	fi


A8) I just changed my login shell to bash, and now I can't FTP into my
   machine.  Why not?

You must add the full pathname to bash to the file /etc/shells.  As
noted in the answer to the previous question, many systems require
this before you can make bash your login shell. 

Most versions of ftpd use this file to prohibit `special' users
such as `uucp' and `news' from using FTP. 

A9)  What's the `POSIX 1003.2 standard'?

POSIX is a name originally coined by Richard Stallman for a
family of open system standards based on UNIX.  There are a
number of aspects of UNIX under consideration for
standardization, from the basic system services at the system
call and C library level to applications and tools to system
administration and management.  Each area of standardization is
assigned to a working group in the 1003 series. 

The POSIX Shell and Utilities standard has been developed by IEEE
Working Group 1003.2 (POSIX.2).  It concentrates on the command
interpreter interface and utility programs commonly executed from
the command line or by other programs.  An initial version of the
standard has been approved and published by the IEEE, and work is
currently underway to update it. 

Bash is concerned with the aspects of the shell's behavior
defined by POSIX.2.  The shell command language has of course
been standardized, including the basic flow control and program
execution constructs, I/O redirection and pipelining, argument
handling, variable expansion, and quoting. 

The `special' builtins, which must be implemented as part of the
shell to provide the desired functionality, are specified as
being part of the shell; examples of these are `eval' and
`export'.  Other utilities appear in the sections of POSIX.2 not
devoted to the shell which are commonly (and in some cases must
be) implemented as builtin commands, such as `read' and `test'. 
POSIX.2 also specifies aspects of the shell's interactive
behavior as part of the UPE, including job control and command
line editing.  Only vi-style line editing commands have been
standardized; emacs editing commands were left out due to
objections.

A10)  What is the bash `posix mode'?

Although bash is an implementation of the POSIX.2 shell
specification, there are areas where the bash default behavior
differs from that spec.  The bash `posix mode' changes the bash
behavior in these areas so that it obeys the spec more closely. 

Posix mode is entered by starting bash with the --posix option or
executing `set -o posix' after bash is running.

The specific aspects of bash which change when posix mode is
active are listed in the file CWRU/POSIX.NOTES in the bash
distribution.  They are also listed in a section in the Bash
Reference Manual.

Section B:  The latest version

B1) What's new in version 2.04?

Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
distribution):

o Programmable word completion with the new `complete' and `compgen' builtins;
  examples are provided in examples/complete/complete-examples
o `history' has a new `-d' option to delete a history entry
o `bind' has a new `-x' option to bind key sequences to shell commands
o The prompt expansion code has new `\j' and `\l' escape sequences
o The `no_empty_cmd_completion' shell option, if enabled, inhibits
  command completion when TAB is typed on an empty line
o `help' has a new `-s' option to print a usage synopsis
o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
o New ksh93-style arithmetic for command:
	for ((expr1 ; expr2; expr3 )); do list; done
o `read' has new options: `-t', `-n', `-d', `-s'
o The redirection code handles several filenames specially:  /dev/fd/N,
  /dev/stdin, /dev/stdout, /dev/stderr
o The redirection code now recognizes /dev/tcp/HOST/PORT and
  /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
  to the specified port on the specified host
o The ${!prefix*} expansion has been implemented
o A new FUNCNAME variable, which expands to the name of a currently-executing
  function
o The GROUPS variable is no longer readonly
o A new shopt `xpg_echo' variable, to control the behavior of echo with
  respect to backslash-escape sequences at runtime
o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned

The version of Readline released with Bash-2.04, Readline-4.1, has several
new features as well:

o Parentheses matching is always compiled into readline, and controllable
  with the new `blink-matching-paren' variable
o The history-search-forward and history-search-backward functions now leave
  point at the end of the line when the search string is empty, like
  reverse-search-history, and forward-search-history
o A new function for applications:  rl_on_new_line_with_prompt()
o New variables for applications:  rl_already_prompted, and rl_gnu_readline_p


A short feature history dating from bash-2.0:

Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes.  A number of new
features were added to Readline, mostly at the request of the Cygnus
folks.

A new shopt option, `restricted_shell', so that startup files can test
	whether or not the shell was started in restricted mode
Filename generation is now performed on the words between ( and ) in
	compound array assignments (this is really a bug fix)
OLDPWD is now auto-exported, as POSIX.2 requires
ENV and BASH_ENV are read-only variables in a restricted shell
Bash may now be linked against an already-installed Readline library,
	as long as the Readline library is version 4 or newer
All shells begun with the `--login' option will source the login shell
	startup files, even if the shell is not interactive

There were lots of changes to the version of the Readline library released
along with Bash-2.03.  For a complete list of the changes, read the file
CHANGES in the Bash-2.03 distribution.

Bash-2.02 contained the following new features:

a new version of malloc (based on the old GNU malloc code in previous
	bash versions) that is more page-oriented, more conservative
	with memory usage, does not `orphan' large blocks when they
	are freed, is usable on 64-bit machines, and has allocation
	checking turned on unconditionally
POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
POSIX.2-style globbing equivalence classes
POSIX.2-style globbing collating symbols
the ksh [[...]] extended conditional command
the ksh egrep-style extended pattern matching operators
a new `printf' builtin
the ksh-like $(<filename) command substitution, which is equivalent to
	$(cat filename)
new tilde prefixes that expand to directories from the directory stack
new `**' arithmetic operator to do exponentiation
case-insensitive globbing (filename expansion)
menu completion a la tcsh
`magic-space' history expansion function like tcsh
the readline inputrc `language' has a new file inclusion directive ($include)

Bash-2.01 contained only a few new features:

new `GROUPS' builtin array variable containing the user's group list
new bindable readline commands: history-and-alias-expand-line and
	alias-expand-line

Bash-2.0 contained extensive changes and new features from bash-1.14.7.
Here's a short list:

new `time' reserved word to time pipelines, shell builtins, and
	shell functions
one-dimensional arrays with a new compound assignment statement,
        appropriate expansion constructs and modifications to some
	of the builtins (read, declare, etc.) to use them
new quoting syntaxes for ANSI-C string expansion and locale-specific
	string translation
new expansions to do substring extraction, pattern replacement, and
	indirect variable expansion
new builtins: `disown' and `shopt'
new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
	       MACHTYPE, BASH_VERSINFO
special handling of many unused or redundant variables removed
	(e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
dynamic loading of new builtin commands; many loadable examples provided
new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
history and aliases available in shell scripts
new readline variables: enable-keypad, mark-directories, input-meta,
	visible-stats, disable-completion, comment-begin
new readline commands to manipulate the mark and operate on the region
new readline emacs mode commands and bindings for ksh-88 compatibility
updated and extended builtins
new DEBUG trap
expanded (and now documented) restricted shell mode

implementation stuff:	
autoconf-based configuration
nearly all of the bugs reported since version 1.14 have been fixed
most builtins converted to use builtin `getopt' for consistency
most builtins use -p option to display output in a reusable form
	(for consistency)
grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded

B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?

This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell.  The bash manual page explains these more
completely.

Things bash has that sh does not:
	long invocation options
	`!' reserved word to invert pipeline return value
	`time' reserved word to time pipelines and shell builtins
	the `function' reserved word
	the `select' compound command and reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	new $'...' and $"..." quoting
	the $(...) form of command substitution
	the $(<filename) form of command substitution, equivalent to
		$(cat filename)
	the ${#param} parameter value length operator
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
	expansion of positional parameters beyond $9 with ${num}
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
		   TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
		   LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
		   ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
		   HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
		   PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
		   SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
		   auto_resume
	DEBUG trap
	variable arrays with new compound assignment syntax
	redirections: <>, &>, >|
	prompt string special char translation and variable expansion
	auto-export of variables in initial environment
	command search finds functions before builtins
	bash return builtin will exit a file sourced with `.'
	builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -p.
		  export -n/-f/-p/name=value, pwd -L/-P,
		  read -e/-p/-a/-t/-n/-d/-s,
		  readonly -a/-f/name=value, trap -l, set +o,
		  set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
		  unset -f/-v, ulimit -m/-p/-u,
		  type -a/-p/-t, suspend -f, kill -n,
		  test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
	bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
	bash restricted shell mode is more extensive
	bash allows functions and variables with the same name
	brace expansion
	tilde expansion
	arithmetic expansion with $((...)) and `let' builtin
	the `[[...]]' extended conditional command
	process substitution
	aliases and alias/unalias builtins
	local variables in functions and `local' builtin
	readline and command-line editing with programmable completion
	command history and history/fc builtins
	csh-like history expansion
	other new bash builtins: bind, command, compgen, complete, builtin,
				 declare/typeset, dirs, enable, fc, help,
				 history, logout, popd, pushd, disown, shopt,
				 printf
	exported functions
	filename generation when using output redirection (command >a*)
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	variable assignments preceding commands affect only that command,
		even for builtins and functions
	posix mode
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
		/dev/tcp/host/port, /dev/udp/host/port

Things sh has that bash does not:
	uses variable SHACCT to do shell accounting
	includes `stop' builtin (bash can use alias stop='kill -s STOP')
	`newgrp' builtin
	turns on job control if called as `jsh'
	$TIMEOUT (like bash $TMOUT)
	`^' is a synonym for `|'
	new SVR4.2 sh builtins: mldmode, priv

Implementation differences:
	redirection to/from compound commands causes sh to create a subshell
	bash does not allow unbalanced quotes; sh silently inserts them at EOF
	bash does not mess with signal 11
	sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100
	bash splits only the results of expansions on IFS, using POSIX.2
		field splitting rules; sh splits all words on IFS
	sh does not allow MAILCHECK to be unset (?)
	sh does not allow traps on SIGALRM or SIGCHLD
	bash allows multiple option arguments when invoked (e.g. -x -v);
		sh allows only a single option argument (`sh -x -v' attempts
		to open a file named `-v', and, on SunOS 4.1.4, dumps core.
		On Solaris 2.4 and earlier versions, sh goes into an infinite
		loop.)
	sh exits a script if any builtin fails; bash exits only if one of
		the POSIX.2 `special' builtins fails

C2)  How does bash differ from the Korn shell, version ksh88?

Things bash has or uses that ksh88 does not:
	long invocation options
	`!' reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	posix mode and posix conformance
	command hashing
	tilde expansion for assignment statements that look like $PATH
	process substitution with named pipes if /dev/fd is not available
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
		   TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
		   HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
		   IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
		   PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
		   GROUPS, FUNCNAME, histchars, auto_resume
	prompt expansion with backslash escapes and command substitution
	redirection: &> (stdout and stderr)
	more extensive and extensible editing and programmable completion
	builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
		  exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
		  jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
		  read -e/-p/-a/-t/-n/-d/-s, readonly -a/-n/-f/-p,
		  set -o braceexpand/-o histexpand/-o interactive-comments/
		  -o notify/-o physical/-o posix/-o hashall/-o onecmd/
		  -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
		  typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
		  disown, printf, complete, compgen
	`!' csh-style history expansion
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	`**' arithmetic operator to do exponentiation
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr

Things ksh88 has or uses that bash does not:
	tracked aliases
	variables: ERRNO, FPATH, EDITOR, VISUAL
	co-processes (|&, >&p, <&p)
	weirdly-scoped functions
	typeset +f to list all function names without definitions
	text of command history kept in a file, not memory
	builtins: alias -x, cd old new, fc -e -, newgrp, print,
		  read -p/-s/-u/var?prompt, set -A/-o gmacs/
		  -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s,
		  typeset -H/-L/-R/-A/-ft/-fu/-fx/-l/-u/-t, whence

Implementation differences:
	ksh runs last command of a pipeline in parent shell context
	bash has brace expansion by default (ksh88 compile-time option)
	bash has fixed startup file for all interactive shells; ksh reads $ENV
	bash has exported functions
	bash command search finds functions before builtins

C3)  Which new features in ksh-93 are not in bash, and which are?

New things in ksh-93 not in bash-2.04:
	associative arrays
	floating point arithmetic
	math library functions
	${!name[sub]} name of subscript for associative array
	`.' is allowed in variable names to create a hierarchical namespace
	more extensive compound assignment syntax
	discipline functions
	`sleep' and `getconf' builtins (bash has loadable versions)
	typeset -n and `nameref' variables
	KEYBD trap
	variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
		   .sh.name, .sh.subscript, .sh.value, HISTEDIT
	backreferences in pattern matching
	print -f (bash uses printf)
	`fc' has been renamed to `hist'
	`.' can execute shell functions

New things in ksh-93 present in bash-2.04:
        for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
        ?:, ++, --, `expr1 , expr2' arithmetic operators
	expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]},
		    ${!param*}
	compound array assignment
	the `!' reserved word
	loadable builtins -- but ksh uses `builtin' while bash uses `enable'
	`command', `builtin', `disown' builtins
	new $'...' and $"..." quoting
	FIGNORE (but bash uses GLOBIGNORE), HISTCMD
	set -o notify/-C
	changes to kill builtin
	read -A (bash uses read -a)
        read -t/-d
	trap -p
	exec -c/-a
	`.' restores the positional parameters when it completes
	POSIX.2 `test'
	umask -S
	unalias -a
	command and arithmetic substitution performed on PS1, PS4, and ENV
	command name completion
	ENV processed only for interactive shells

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?

On many systems, `which' is actually a csh script that assumes
you're running csh.  In tcsh, `which' and its cousin `where'
are builtins.  On other Unix systems, `which' is a perl script
that uses the PATH environment variable.

The csh script version reads the csh startup files from your
home directory and uses those to determine which `command' will
be invoked.  Since bash doesn't use any of those startup files,
there's a good chance that your bash environment differs from
your csh environment.  The bash `type' builtin does everything
`which' does, and will report correct results for the running
shell.  If you're really wedded to the name `which', try adding
the following function definition to your .bashrc:

	which()
	{
		builtin type "$@"
	}

If you're moving from tcsh and would like to bring `where' along
as well, use this function:

	where()
	{
		builtin type -a "$@"
	}

D2) Why doesn't bash treat brace expansions exactly like csh?

The only difference between bash and csh brace expansion is that
bash requires a brace expression to contain at least one unquoted
comma if it is to be expanded.  Any brace-surrounded word not
containing an unquoted comma is left unchanged by the brace
expansion code.  This affords the greatest degree of sh
compatibility. 

Bash, ksh, zsh, and pd-ksh all implement brace expansion this way. 

D3) Why doesn't bash have csh variable modifiers?

Posix has specified a more powerful, albeit somewhat more cryptic,
mechanism cribbed from ksh, and bash implements it.

${parameter%word}
        Remove smallest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the suffix matched by the pattern deleted.

        x=file.c
        echo ${x%.c}.o
        -->file.o

${parameter%%word}

        Remove largest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the suffix matched by the pattern deleted.

        x=posix/src/std
        echo ${x%%/*}
        -->posix

${parameter#word}
        Remove smallest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the prefix matched by the pattern deleted.

        x=$HOME/src/cmd
        echo ${x#$HOME}
        -->/src/cmd

${parameter##word}
        Remove largest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the prefix matched by the pattern deleted.

        x=/one/two/three
        echo ${x##*/}
        -->three


Given
	a=/a/b/c/d
	b=b.xxx

	csh			bash		result
	---			----		------
	$a:h			${a%/*}		   /a/b/c
	$a:t			${a##*/}	   d
	$b:r			${b%.*}		   b
	$b:e			${b##*.}	   xxx


D4) How can I make my csh aliases work when I convert to bash?

Bash uses a different syntax to support aliases than csh does. 
The details can be found in the documentation.  We have provided
a shell script which does most of the work of conversion for you;
this script can be found in ./examples/misc/alias-conv.sh.  Here is
how you use it:
  
Start csh in the normal way for you.  (e.g., `csh')
  
Pipe the output of `alias' through `alias-conv.sh', saving the
results into `bash_aliases':
  
	alias | alias-conv.sh >bash_aliases
  
Edit `bash_aliases', carefully reading through any created
functions.  You will need to change the names of some csh specific
variables to the bash equivalents.  The script converts $cwd to
$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt
to $PS1.  You may also have to add quotes to avoid unwanted
expansion.

For example, the csh alias:
  
	alias cd 'cd \!*; echo $cwd'
  
is converted to the bash function:

	cd () { command cd "$@"; echo $PWD ; }

The only thing that needs to be done is to quote $PWD:
  
	cd () { command cd "$@"; echo "$PWD" ; }
  
Merge the edited file into your ~/.bashrc.

There is an additional, more ambitious, script in
examples/misc/cshtobash that attempts to convert your entire csh
environment to its bash equivalent.  This script can be run as
simply `cshtobash' to convert your normal interactive
environment, or as `cshtobash ~/.login' to convert your login
environment. 

D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?

Use
	command 2>&1 | command2

The key is to remember that piping is performed before redirection, so
file descriptor 1 points to the pipe when it is duplicated onto file
descriptor 2.

D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

There are features in ksh-88 and ksh-93 that do not have direct bash
equivalents.  Most, however, can be emulated with very little trouble.

ksh-88 feature		Bash equivalent
--------------		---------------
compiled-in aliases	set up aliases in .bashrc; some ksh aliases are
			bash builtins (hash, history, type)
coprocesses		named pipe pairs (one for read, one for write)
typeset +f		declare -F
cd, print, whence	function substitutes in examples/functions/kshenv
autoloaded functions	examples/functions/autoload is the same as typeset -fu
read var?prompt		read -p prompt var

ksh-93 feature		Bash equivalent
--------------		---------------
sleep, getconf		Bash has loadable versions in examples/loadables
${.sh.version}		$BASH_VERSION
print -f		printf
hist			alias fc=hist
$HISTEDIT		$FCEDIT

Section E:  How can I get bash to do certain things, and why does bash do
	    things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?

The specific example used here is [ ! x -o x ], which is false.

Bash's builtin `test' implements the Posix.2 spec, which can be
summarized as follows (the wording is due to David Korn):
   
Here is the set of rules for processing test arguments.
  
    0 Args: False
    1 Arg:  True iff argument is not null.
    2 Args: If first arg is !, True iff second argument is null.
	    If first argument is unary, then true if unary test is true
	    Otherwise error.
    3 Args: If second argument is a binary operator, do binary test of $1 $3
	    If first argument is !, negate two argument test of $2 $3
	    If first argument is `(' and third argument is `)', do the
	    one-argument test of the second argument.
	    Otherwise error.
    4 Args: If first argument is !, negate three argument test of $2 $3 $4.
	    Otherwise unspecified
    5 or more Args: unspecified.  (Historical shells would use their
    current algorithm).
   
The operators -a and -o are considered binary operators for the purpose
of the 3 Arg case.
   
As you can see, the test becomes (not (x or x)), which is false.

E2) Why does bash sometimes say `Broken pipe'?

If a sequence of commands appears in a pipeline, and one of the
reading commands finishes before the writer has finished, the
writer receives a SIGPIPE signal.  Many other shells special-case
SIGPIPE as an exit status in the pipeline and do not report it. 
For example, in:
  
      ps -aux | head
  
`head' can finish before `ps' writes all of its output, and ps
will try to write on a pipe without a reader.  In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE. 

You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.

E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?

Readline, the line editing library that bash uses, does not know
that the terminal escape sequences do not take up space on the
screen.  The redisplay code assumes, unless told otherwise, that
each character in the prompt is a `printable' character that
takes up one character position on the screen. 

You can use the bash prompt expansion facility (see the PROMPTING
section in the manual page) to tell readline that sequences of
characters in the prompt strings take up no screen space. 

Use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence. 

E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?

This has to do with the parent-child relationship between Unix
processes. 

Each element of a pipeline runs in a separate process, a child of
the shell running the pipeline.  A subprocess cannot affect its
parent's environment.  When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell.  When the subshell exits, the value of the variable
is lost. 

Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
a specified command.  The output can then be assigned to a
variable:

	grep ^gnu /usr/lib/news/active | wc -l | read ngroup

can be converted into

	ngroup=$(grep ^gnu /usr/lib/news/active | wc -l)

This does not, unfortunately, work to split the text among
multiple variables, as read does when given multiple variable
arguments.  If you need to do this, you can either use the
command substitution above to read the output into a variable
and chop up the variable using the bash pattern removal
expansion operators or use some variant of the following
approach.

Say /usr/local/bin/ipaddr is the following shell script:

#! /bin/sh
host `hostname` | awk '/address/ {print $NF}'

Instead of using

	/usr/local/bin/ipaddr | read A B C D

to break the local machine's IP address into separate octets, use

	OIFS="$IFS"
	IFS=.
	set -- $(/usr/local/bin/ipaddr)
	IFS="$OIFS"
	A="$1" B="$2" C="$3" D="$4"

Beware, however, that this will change the shell's positional
parameters.  If you need them, you should save them before doing
this.

This is the general approach -- in most cases you will not need to
set $IFS to a different value.

E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?

This is the behavior of echo on most Unix System V machines.

The bash builtin `echo' is modeled after the 9th Edition
Research Unix version of `echo'.  It does not interpret
backslash-escaped characters in its argument strings by default;
it requires the use of the -e option to enable the
interpretation.  The System V echo provides no way to disable the
special characters; the bash echo has a -E option to disable
them. 

There is a configuration option that will make bash behave like
the System V echo and interpret things like `\t' by default.  Run
configure with the --enable-usg-echo-default option to turn this
on.  Be aware that this will cause some of the tests run when you
type `make tests' to fail.

There is a shell option, `xpg_echo', settable with `shopt' that will
change the behavior of echo at runtime.  Enabling this option turns
on expansion of backslash-escape sequences.

E6) Why doesn't a while or for loop get suspended when I type ^Z?

This is a consequence of how job control works on Unix.  The only
thing that can be suspended is the process group.  This is a single
command or pipeline of commands that the shell forks and executes.

When you run a while or for loop, the only thing that the shell forks
and executes are any commands in the while loop test and commands in
the loop bodies.  These, therefore, are the only things that can be
suspended when you type ^Z.

If you want to be able to stop the entire loop, you need to put it
within parentheses, which will force the loop into a subshell that
may be stopped (and subsequently restarted) as a single unit.

E7) What about empty for loops in Makefiles?

It's fairly common to see constructs like this in automatically-generated
Makefiles:

SUBDIRS = @SUBDIRS@

	...

subdirs-clean:
	for d in $SUBDIRS; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done

When SUBDIRS is empty, this results in a command like this being passed to
bash:

	for d in ; do
		( cd $$d && ${MAKE} ${MFLAGS} clean )
	done

This is a syntax error.  If the reserved word `in' is present, a word must
follow it before the semicolon or newline.  The language in the manual page
referring to the list of words being empty refers to the list after it is
expanded.  There must be at least one word following the `in' when the
construct is parsed.

The idiomatic Makefile solution is something like:

SUBDIRS = @SUBDIRS@

subdirs-clean:
	subdirs=$SUBDIRS ; for d in $$subdirs; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done


The POSIX.2 interpretation committee has considered this issue and declared
that the bash implemenation is correct, according to the standard:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-169.html

E8) Why does the arithmetic evaluation code complain about `08'?

The bash arithmetic evaluation code (used for `let', $(()), (()), and in
other places), interprets a leading `0' in numeric constants as denoting
an octal number, and a leading `0x' as denoting hexadecimal.  This is
in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
arithmetic constants should be handled as signed long integers as defined
by the ANSI/ISO C standard.

The POSIX.2 interpretation committee has confirmed this:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?

The problem is `cmdtool' and bash fighting over the input.  When
scrolling is enabled in a cmdtool window, cmdtool puts the tty in
`raw mode' to permit command-line editing using the mouse for
applications that cannot do it themselves.  As a result, bash and
cmdtool each try to read keyboard input immediately, with neither
getting enough of it to be useful.

This mode also causes cmdtool to not implement many of the
terminal functions and control sequences appearing in the
`sun-cmd' termcap entry.  For a more complete explanation, see
that file examples/suncmd.termcap in the bash distribution. 

`xterm' is a better choice, and gets along with bash much more
smoothly.

If you must use cmdtool, you can use the termcap description in
examples/suncmd.termcap.  Set the TERMCAP variable to the terminal
description contained in that file, i.e.

TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:'

Then export TERMCAP and start a new cmdtool window from that shell.
The bash command-line editing should behave better in the new
cmdtool.  If this works, you can put the assignment to TERMCAP
in your bashrc file.

F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?

This is the consequence of building bash on SunOS 5 and linking
with the libraries in /usr/ucblib, but using the definitions
and structures from files in /usr/include. 

The actual conflict is between the dirent structure in
/usr/include/dirent.h and the struct returned by the version of
`readdir' in libucb.a (a 4.3-BSD style `struct direct'). 

Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH
when configuring and building bash.  This will ensure that you
use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you
link with libc before libucb. 

If you have installed the Sun C compiler, you may also need to
put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before
/usr/ucb.

F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?

This is a famous and long-standing bug in the SunOS YP (sorry, NIS)
client library, which is part of libc.

The YP library code keeps static state -- a pointer into the data
returned from the server.  When YP initializes itself (setpwent),
it looks at this pointer and calls free on it if it's non-null. 
So far, so good. 

If one of the YP functions is interrupted during getpwent (the
exact function is interpretwithsave()), and returns NULL, the
pointer is freed without being reset to NULL, and the function
returns.  The next time getpwent is called, it sees that this
pointer is non-null, calls free, and the bash free() blows up
because it's being asked to free freed memory. 

The traditional Unix mallocs allow memory to be freed multiple
times; that's probably why this has never been fixed.  You can
run configure with the `--without-gnu-malloc' option to use
the C library malloc and avoid the problem.

F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?

The `@' character is the default `line kill' character in most
versions of System V, including SVR4.2.  You can change this
character to whatever you want using `stty'.  For example, to
change the line kill character to control-u, type

	stty kill ^U

where the `^' and `U' can be two separate characters.

F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?

The actual command in question is something like

	< file ( command )

According to the grammar given in the POSIX.2 standard, this construct
is, in fact, a syntax error.  Redirections may only precede `simple
commands'.  A subshell construct such as the above is one of the shell's
`compound commands'.  A redirection may only follow a compound command.

This affects the mechanical transformation of commands that use `cat'
to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on
comp.unix.shell).  While most commands of the form

	cat file | command

can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.

The file CWRU/sh-redir-hack in the bash-2.04 distribution is an
(unofficial) patch to parse.y that will modify the grammar to
support this construct.  It will not apply with `patch'; you must
modify parse.y by hand.  Note that if you apply this, you must
recompile with -DREDIRECTION_HACK.  This introduces a large
number of reduce/reduce conflicts into the shell grammar. 

F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

The short answer is that Red Hat screwed up.

The long answer is that they shipped an /etc/inputrc that only works
for emacs mode editing, and then screwed all the vi users by setting
INPUTRC to /etc/inputrc in /etc/profile.

The short fix is to do one of the following: remove or rename
/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile,
but make sure you export it if you do), remove the assignment to
INPUTRC from /etc/profile, add

        set keymap emacs

to the beginning of /etc/inputrc, or bracket the key bindings in
/etc/inputrc with these lines

	$if mode=emacs
		[...]
	$endif

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?

This is a process requiring several steps.

First, you must ensure that the `physical' data path is a full eight
bits.  For xterms, for example, the `vt100' resources `eightBitInput'
and `eightBitOutput' should be set to `true'.

Once you have set up an eight-bit path, you must tell the kernel and
tty driver to leave the eighth bit of characters alone when processing
keyboard input.  Use `stty' to do this:

	stty cs8 -istrip -parenb

For old BSD-style systems, you can use

	stty pass8

You may also need

	stty even odd

Finally, you need to tell readline that you will be inputting and
displaying eight-bit characters.  You use readline variables to do
this.  These variables can be set in your .inputrc or using the bash
`bind' builtin.  Here's an example using `bind':

	bash$ bind 'set convert-meta off'
	bash$ bind 'set meta-flag on'
	bash$ bind 'set output-meta on'

The `set' commands between the single quotes may also be placed
in ~/.inputrc.

G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?

This is why the `command' and `builtin' builtins exist.  The
`command' builtin executes the command supplied as its first
argument, skipping over any function defined with that name.  The
`builtin' builtin executes the builtin command given as its first
argument directly. 

For example, to write a function to replace `cd' that writes the
hostname and current directory to an xterm title bar, use
something like the following:

	cd()
	{
		builtin cd "$@" && xtitle "$HOST: $PWD"
	}

This could also be written using `command' instead of `builtin';
the version above is marginally more efficient. 

G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?

Versions of Bash newer than Bash-2.0 support this directly.  You can use 

	${!var}

For example, the following sequence of commands will echo `z':

	var1=var2
	var2=z
	echo ${!var1}

For sh compatibility, use the `eval' builtin.  The important
thing to remember is that `eval' expands the arguments you give
it again, so you need to quote the parts of the arguments that
you want `eval' to act on. 

For example, this expression prints the value of the last positional
parameter:

	eval echo \"\$\{$#\}\"

The expansion of the quoted portions of this expression will be
deferred until `eval' runs, while the `$#' will be expanded
before `eval' is executed.  In versions of bash later than bash-2.0,

	echo ${!#}

does the same thing.

G4) How can I make the bash `time' reserved word print timing output that
     looks like the output from my system's /usr/bin/time?

The bash command timing code looks for a variable `TIMEFORMAT' and
uses its value as a format string to decide how to display the
timing statistics.

The value of TIMEFORMAT is a string with `%' escapes expanded in a
fashion similar in spirit to printf(3).  The manual page explains
the meanings of the escape sequences in the format string.

If TIMEFORMAT is not set, bash acts as if the following assignment had
been performed:

	TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'

The POSIX.2 default time format (used by `time -p command') is

	TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'

The BSD /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys'

The System V /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S'

The ksh format can be emulated with:

	TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS'

G5) How do I get the current directory into my prompt?

Bash provides a number of backslash-escape sequences which are expanded
when the prompt string (PS1 or PS2) is displayed.  The full list is in
the manual page.

The \w expansion gives the full pathname of the current directory, with
a tilde (`~') substituted for the current value of $HOME.  The \W
expansion gives the basename of the current directory.  To put the full
pathname of the current directory into the path without any tilde
subsitution, use $PWD.  Here are some examples:

	PS1='\w$ '	# current directory with tilde
	PS1='\W$ '	# basename of current directory
	PS1='$PWD$ '	# full pathname of current directory

The single quotes are important in the final example to prevent $PWD from
being expanded when the assignment to PS1 is performed.

G6) How can I rename "*.foo" to "*.bar"?

Use the pattern removal functionality described in D3.  The following `for'
loop will do the trick:

	for f in *.foo; do
		mv $f ${f%foo}bar
	done

G7) How can I translate a filename from uppercase to lowercase?

The script examples/functions/lowercase, originally written by John DuBois,
will do the trick.  The converse is left as an exercise.

G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

You must have set the `extglob' shell option using `shopt -s extglob' to use
this:

	echo .!(.|) *

A solution that works without extended globbing is given in the Unix Shell
FAQ, posted periodically to comp.unix.shell.

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?

Use the `bashbug' script to report bugs.  It is built and
installed at the same time as bash.  It provides a standard
template for reporting a problem and automatically includes
information about your configuration and build environment. 

`bashbug' sends its reports to bug-bash@gnu.org, which
is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug. 

Bug fixes, answers to questions, and announcements of new releases
are all posted to gnu.bash.bug.  Discussions concerning bash features
and problems also take place there.

To reach the bash maintainers directly, send mail to
bash-maintainers@gnu.org.

H2) What kind of bash documentation is there?

First, look in the doc directory in the bash distribution.  It should
contain at least the following files:

bash.1		an extensive, thorough Unix-style manual page
builtins.1	a manual page covering just bash builtin commands
bashref.texi	a reference manual in GNU tex`info format
bashref.info	an info version of the reference manual
FAQ		this file
article.ms	text of an article written for The Linux Journal
readline.3	a man page describing readline

Postscript, HTML, and ASCII files created from the above source are
available in the documentation distribution.

There is additional documentation available for anonymous FTP from host
ftp.cwru.edu in the `pub/bash' directory.

Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates.  The book is based on Bill Rosenblatt's Korn
Shell book.  The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X.  Look for it in fine bookstores near you.  This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.  

A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2.  Look for it in the same fine bookstores
or on the web.

H3) What's coming in future versions?

These are features I plan to include in a future version of bash.

a bash debugger (a minimally-tested version is included with bash-2.04)
associative arrays

H4) What's on the bash `wish list' for future versions?

These are features that may or may not appear in a future version of bash.

breaking some of the shell functionality into embeddable libraries
a module system like zsh's, using dynamic loading like builtins
better internationalization using GNU `gettext'
an option to use external files for the long `help' text
date-stamped command history
a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
	variables (contributions gratefully accepted)

H5) When will the next release appear?

The next version will appear sometime in 2000 or 2001.  Never make
predictions. 


This document is Copyright 1995-2000 by Chester Ramey.

Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
this document for any purpose, provided that the above copyright
notice appears in all copies of this document and that the
contents of this document remain unaltered.


From chet@nike.ins.cwru.edu Mon Nov 13 10:40:51 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vLj0-0003oo-00
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 10:40:51 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA02628; Mon, 13 Nov 2000 10:43:08 -0500 (EST) (from chet)
Date: Mon, 13 Nov 2000 10:34:56 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: boerio@ichips.intel.com
Subject: Re: bash 2.03 tests ...
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001113153456.AA02599.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from boerio@ichips.intel.com of Fri, 10 Nov 2000 16:03:20 -0800 (PST) (id <200011110003.QAA20454@plxw0032.pdx.intel.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> I don't have a bug to report, but merely a suggestion for those of us
> attempting to "make tests" to verify that the bash build has been done
> successfully.
> 
> On AIX and HP platforms, many people may not have floppy drives, and as
> such, the run-test test will produce some output:

This has nothing to do with whether or not a machine has a floppy drive.
/dev/fd is a mechanism which maps open file descriptors into the file
system.

If the /dev/fd directory does not exist, bash emulates it internally.

I don't have any HP machines, but running `make tests' for

versinfo: 2 04 0 1 release rs6000-ibm-aix4.2.1.0

runs without errors.



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Mon Nov 13 10:42:25 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vLkX-0003rE-00
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 10:42:25 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA02635; Mon, 13 Nov 2000 10:44:35 -0500 (EST) (from chet)
Date: Mon, 13 Nov 2000 10:43:21 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: clgonsal@kami.com
Subject: Re: bash2 can't parse function definitions inside if statements
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001113154321.AA02632.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from clgonsal@kami.com of Sat, 11 Nov 2000 13:35:21 -0800 (id <200011112135.NAA02042@smtp.mail.yahoo.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Machine Type: i386-redhat-linux-gnu
> 
> Bash Version: 2.03
> Patch Level: 8
> Release Status: release
> 
> Description:
> 	bash2 doen't seem to be able to parse if statements that contain
> 	function definitions. Note that plain old bash doesn't have this
> 	problem. Here's a test script to demonstrate:
> 
> =========================== C U T   H E R E ===========================
> # Test script for functions in ifs in bash2
> # bash can execute this script just fine, but bash2 cannot :-(

That's because the script has a syntax error that bash-1.14.x accepted
inappropriately.

> then
>     function greet () { echo hello "$*" }
>     echo Howdy
> else
>     function greet () { echo goodbye "$*" }
>     echo Ack!
> fi

A semicolon is required before the closing brace.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Mon Nov 13 10:44:26 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vLmU-0003sd-00
	for <bug-bash@gnu.org>; Mon, 13 Nov 2000 10:44:26 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA02649; Mon, 13 Nov 2000 10:44:14 -0500 (EST) (from chet)
Date: Mon, 13 Nov 2000 10:45:09 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: avl@logic.at
Subject: Re: bug in SIGWINCH-handling ?
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001113154509.AA02646.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from avl@logic.at of Mon, 13 Nov 2000 14:03:12 +0100 (id <200011131303.OAA28108@pc7499.gud.siemens.at>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Machine Type: i586-mandrake-linux-gnu
> 
> Bash Version: 2.03
> Patch Level: 16
> Release Status: release
> 
> Description:
>     May also be a readline-bug.
> 	I have bash running in xterm.
>     if bash is on prompt, and I resize xterm, all is ok, but
>     if some program is running, and I resize xterm, and later 
>        exit the program, then the readline-library seems not 
>        to have noticed the resizing.

Of course not.  Since it was not the foreground process group, it never
received the SIGWINCH.  If you're in the habit of doing this often, you
might want to look at the `checkwinsize' option to `shopt'.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From ohama@dpri.kyoto-u.ac.jp Mon Nov 13 21:20:35 2000
Received: from sss.dpri.kyoto-u.ac.jp ([133.3.69.2] helo=koala.dpri.kyoto-u.ac.jp)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13vVi2-0008G3-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 13 Nov 2000 21:20:31 -0500
Received: (from ohama@localhost)
	by koala.dpri.kyoto-u.ac.jp (8.9.3+3.2W/3.7W1.0) id LAA01526
	for bug-bash@prep.ai.mit.edu; Tue, 14 Nov 2000 11:21:32 +0900
Date: Tue, 14 Nov 2000 11:21:32 +0900
From: ohama <ohama@dpri.kyoto-u.ac.jp>
Message-Id: <200011140221.LAA01526@koala.dpri.kyoto-u.ac.jp>
To: bug-bash@prep.ai.mit.edu
Subject: [50 character or so descriptive subject here (for reference)]
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: Linux
Compiler: gcc
Compilation CFLAGS:   -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_STDLIB_H -DHAVE_LIMITS_H        -DHAVE_GETGROUPS -DHAVE_RESOURCE -DHAVE_SYS_PARAM -DVOID_SIGHANDLER -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_GETPW_DECLS -DHAVE_GETHOSTNAME -DHAVE_WAIT_H         -DHAVE_DUP2 -DHAVE_STRERROR  -DHAVE_DIRENT_H -DHAVE_STRING_H        -DHAVE_VARARGS_H -DHAVE_STRCHR  -DHAVE_DEV_FD        -Di386 -DLinux -DSHELL -DHAVE_ALLOCA -DHAVE_ALLOCA_H 	   -g -DKANJI
uname output: Linux koala.dpri.kyoto-u.ac.jp 2.2.14-1vl6 #1 Mon Mar 13 18:39:36 JST 2000 i686 unknown

Bash Version: 1.14
Patch Level: 7

Description:
        [Detailed description of the problem, suggestion, or complaint.]

Repeat-By:
        [Describe the sequence of events that causes the problem
        to occur.]

Fix:
        [Description of how to fix the problem.  If you don't know a
        fix for the problem, don't include this section.]

















From news@news-int.gatech.edu Tue Nov 14 10:08:28 2000
Received: from sprettur.isnet.is ([193.4.58.19])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vhhD-0006iM-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 14 Nov 2000 10:08:28 -0500
Received: from news-int.gatech.edu (IDENT:news@news-int.gatech.edu [130.207.244.116])
	by sprettur.isnet.is (8.11.0/8.11.0/isnet) with ESMTP id eAEF8QA50586
	for <gnu-bash-bug@moderators.isc.org>; Tue, 14 Nov 2000 15:08:26 GMT
	(envelope-from news@news-int.gatech.edu)
Received: (from news@localhost)
	by news-int.gatech.edu (8.9.2/8.9.2) id KAA23149
	for gnu-bash-bug@moderators.isc.org; Tue, 14 Nov 2000 10:08:20 -0500 (EST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: jehsom@-nospam-angband.org (Jehsom)
Newsgroups: gnu.bash.bug
Subject: Re: read doesn't handle pipes
Date: 14 Nov 2000 15:08:20 GMT
Organization: Setec Astronomy
Lines: 16
Message-ID: <8urkh4$m8r$1@news-int.gatech.edu>
References: <20001025132453.A3ABD233FB@mail.redhat.de>
NNTP-Posting-Host: jehsom@r80h18.res.gatech.edu
X-Trace: news-int.gatech.edu 974214500 22811 128.61.80.18 (14 Nov 2000 15:08:20 GMT)
X-Complaints-To: usenet@news.gatech.edu
NNTP-Posting-Date: 14 Nov 2000 15:08:20 GMT
X-Total-User-Posts: 2636
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17 (i686))
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

bero@redhat.com wrote:
> 	[bero@zell bero]$ test=""
> 	[bero@zell bero]$ echo "Linux now" |read test
> 	[bero@zell bero]$ echo $test
> 	
> 	[bero@zell bero]$

This is expected behavior, as commands in a pipeline execute in subshells.

Moshe

-- 
jehsom@ angband.org cc.gatech.edu polter.net shaftnet.org nullity.dhs.org
wreck.org bellsouth.net resnet.gatech.edu burdell.org yo.dhs.org gooning.org
usa.net togetherweb.com spoonless.net; gte741e mj116 @prism.gatech.edu; 
jacobsonconsulting@ usa.net; ICQ 1900670


From news@news-int.gatech.edu Tue Nov 14 10:12:37 2000
Received: from moderated.news.pipex.net ([158.43.192.79])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13vhlF-0006m6-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 14 Nov 2000 10:12:37 -0500
Received: (qmail 9681 invoked by alias); 14 Nov 2000 15:12:35 -0000
Received: (qmail 9677 invoked from network); 14 Nov 2000 15:12:34 -0000
Received: from news-int.gatech.edu (130.207.244.116)
  by moderated.news.pipex.net with SMTP; 14 Nov 2000 15:12:34 -0000
Received: (from news@localhost)
	by news-int.gatech.edu (8.9.2/8.9.2) id KAA23219
	for gnu-bash-bug@moderators.isc.org; Tue, 14 Nov 2000 10:12:33 -0500 (EST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: jehsom@-nospam-angband.org (Jehsom)
Newsgroups: gnu.bash.bug
Subject: Re: bash2 can't parse function definitions inside if statements
Date: 14 Nov 2000 15:12:33 GMT
Organization: Setec Astronomy
Lines: 16
Message-ID: <8urkp1$m8r$2@news-int.gatech.edu>
References: <200011112135.NAA02042@smtp.mail.yahoo.com>
NNTP-Posting-Host: jehsom@r80h18.res.gatech.edu
X-Trace: news-int.gatech.edu 974214753 22811 128.61.80.18 (14 Nov 2000 15:12:33 GMT)
X-Complaints-To: usenet@news.gatech.edu
NNTP-Posting-Date: 14 Nov 2000 15:12:33 GMT
X-Total-User-Posts: 2636
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17 (i686))
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

clgonsal@kami.com wrote:
>     function greet () { echo hello "$*" }
>     function greet () { echo goodbye "$*" }

It says clearly in the COMPAT file included with bash-2.04 that a set
of commands in braces now require a semicolon and/or newline before the
closing brace. It was actually incorrect that bash1 accepted the incor-
rect syntax.

Moshe

-- 
jehsom@ angband.org cc.gatech.edu polter.net shaftnet.org nullity.dhs.org
wreck.org bellsouth.net resnet.gatech.edu burdell.org yo.dhs.org gooning.org
usa.net togetherweb.com spoonless.net; gte741e mj116 @prism.gatech.edu; 
jacobsonconsulting@ usa.net; ICQ 1900670


From news@news-int.gatech.edu Tue Nov 14 10:15:35 2000
Received: from backdraft.briar.org ([192.207.123.123] helo=briar.org)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13vho7-0006nT-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 14 Nov 2000 10:15:35 -0500
Received: (from smap@localhost) by briar.org (8.9.1b+Sun/8.6.12) id KAA00109 for <gnu-bash-bug@moderators.isc.org>; Tue, 14 Nov 2000 10:15:00 -0500 (EST)
X-Authentication-Warning: backdraft.briar.org: smap set sender to <news@news-int.gatech.edu> using -f
Received: from news-int.gatech.edu(130.207.244.116) by backdraft via smap (V2.1)
	id xma000107; Tue, 14 Nov 00 10:14:49 -0500
Received: (from news@localhost)
	by news-int.gatech.edu (8.9.2/8.9.2) id KAA23250
	for gnu-bash-bug@moderators.isc.org; Tue, 14 Nov 2000 10:14:48 -0500 (EST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: jehsom@-nospam-angband.org (Jehsom)
Newsgroups: gnu.bash.bug
Subject: Re: Bug found
Date: 14 Nov 2000 15:14:48 GMT
Organization: Setec Astronomy
Lines: 17
Message-ID: <8urkt8$m8r$3@news-int.gatech.edu>
References: <200011071747.SAA01172@stud4.tuwien.ac.at>
NNTP-Posting-Host: jehsom@r80h18.res.gatech.edu
X-Trace: news-int.gatech.edu 974214888 22811 128.61.80.18 (14 Nov 2000 15:14:48 GMT)
X-Complaints-To: usenet@news.gatech.edu
NNTP-Posting-Date: 14 Nov 2000 15:14:48 GMT
X-Total-User-Posts: 2636
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17 (i686))
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Andreas Adamcik <e9126482@student.tuwien.ac.at> wrote:
>  find . -name x | xargs cd
> 	doesn't change to the found directory

That's because the 'cd' that xargs is using is an executable, not the
bash builtin. Don't ask me why there is a cd executable; it's completely
worthless, as no child process can modify the environment (including the
current working directory) of its parent process. So you need to find an-
other way of changing directories.

Moshe

-- 
jehsom@ angband.org cc.gatech.edu polter.net shaftnet.org nullity.dhs.org
wreck.org bellsouth.net resnet.gatech.edu burdell.org yo.dhs.org gooning.org
usa.net togetherweb.com spoonless.net; gte741e mj116 @prism.gatech.edu; 
jacobsonconsulting@ usa.net; ICQ 1900670


From mp3segaplayer@yahoo.com Tue Nov 14 16:19:14 2000
Received: from nts001.witty.co.jp ([210.227.150.146])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13vnTx-0000sm-00; Tue, 14 Nov 2000 16:19:10 -0500
Received: from [63.30.30.105] by nts001.witty.co.jp (Post.Office MTA v3.0
          release 0122 ID# 110-36885U100L2S100) with SMTP id AAI160;
          Wed, 15 Nov 2000 04:44:12 +0900
Received: from  by 1Cust105.tnt3.corpus-christi3.tx.da.uu.net with ESMTP; Tue, 14 Nov 2000 12:44:45 -0500
Message-ID: <00005d860d37$00001dcf$00001243@>
To: <Undisclosed Recipients>
From: mp3segaplayer@yahoo.com
Subject: DVD-MP3 Sega Player...FREE Star Wars Movie
Date: Tue, 14 Nov 2000 12:44:37 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 1
X-MSMail-Priority: High
X-RBL-Warning: (relays.mail-abuse.org) 
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

The 8050+ DVD PLAYER!!!
PLAYS ALL DVDS, Mp3's and VCDS.......ALLOWS COPYING OF DVDS!!

For more info or to place an order call: 
1-800-659-1991
Special Offer Code: 300, without this code your order can't be processed.
(Toll Free in U.S. Outside of U.S. receive $5.00 phone credit off order price)
 
Did you know that with 6 different types of DVD disks on the market, not all players can play all DVDs??
That's right...The low end DVD models in most stores can't play all DVD movies!!

Now, not available in U.S. stores , get a Region Free DVD Player capable 
off playing all types of DVDs!! Compare at thousands of dollars!!

The 8050+ DVD,CD MP3 Player ..... 
REGION FREE ...Play DVDS from all over the world. 

The 8050+ DVD,CD MP 3 Player . Comparable to the $1500 DVD players
found in Europe and Asia. Your Price: ONLY $249.95



From news@dejanews.com Tue Nov 14 20:41:08 2000
Received: from rutgers.edu ([165.230.4.76] helo=rutgers.rutgers.edu)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13vrZU-0008Uh-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 14 Nov 2000 20:41:08 -0500
Received: from mail.deja.com (mail.deja.com [64.57.170.34])
	by rutgers.rutgers.edu (8.8.8/8.8.8) with ESMTP id UAA02901
	for <gnu-bash-bug@moderators.isc.org>; Tue, 14 Nov 2000 20:41:07 -0500 (EST)
Received: from nnrp1.deja.com (nnrp1.deja.com [10.12.2.16])
	by mail.deja.com (8.8.7/8.8.5) with ESMTP id TAA09202
	for <gnu-bash-bug@moderators.isc.org>; Tue, 14 Nov 2000 19:41:06 -0600
Received: (news@localhost) by nnrp1.deja.com (8.7.6/8.6.12) id TAA04446; Tue, 14 Nov 2000 19:41:04 -0600
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: j8fx@my-deja.com
Newsgroups: gnu.bash.bug
Subject: Stack speed access
Date: Wed, 15 Nov 2000 01:41:05 GMT
Organization: Deja.com - Before you buy.
Lines: 69
Message-ID: <8uspjg$4at$1@nnrp1.deja.com>
NNTP-Posting-Host: 203.184.160.2
X-Article-Creation-Date: Wed Nov 15 01:41:05 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
X-Http-Proxy: 1.1 x67.deja.com:80 (Squid/1.1.22) for client 203.184.160.2
X-MyDeja-Info: XMYDJUIDj8fx
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Hi all:

My name is Alan and I have a question that I need some help from all
great minds in this forum.

The question are as follow:

Question:

Platform 1 = Pentium 600 ,Win NT 4.0 + SP4 , Visual C++ 6.0
Platform 2 = Pentium 600, Suse Linux 6.4 , GCC compiler 2.95.2 with
optimize flag '-O2' set.

I have programmed the following code for a small test and run it on two
different platform as stated above.

Code:
====

void STATIC_RAM_TEST()
{
	unsigned long bigArray1[500];
	unsigned long bigArray2[500];
	unsigned long bigArray3[500];
	unsigned long bigArray4[500];
	unsigned long bigArray5[500];
	unsigned long bigArray6[500];
	unsigned long bigArray7[500];
	unsigned long bigArray8[500];
	unsigned long i;

	for (i=0;i<500;i++) {
		bigArray2[i] = bigArray1[i] + i;
		bigArray3[i] = bigArray2[i] + bigArray1[i];
		bigArray4[i] = bigArray3[i] + bigArray2[i];
		bigArray5[i] = bigArray4[i] + bigArray3[i];
		bigArray6[i] = bigArray5[i] + bigArray4[i];
		bigArray7[i] = bigArray6[i] + bigArray5[i];
		bigArray8[i] = bigArray7[i] + bigArray6[i];
	}
}

The results is as follow:
MS Visual C++ =  ~900ms
Linux with GCC = ~2000ms

We then change the declaration of these arrays to "static" and rerun
the test, the result are as follow:

MS Visual C++ =  ~900ms
Linux with GCC = ~950ms

We have isolated the problem to be "access speed to locally defined
automatic arrays" i.e. stack access speed. Our arrays are typically 1
KB in size and we use lots of them in our functions. As shown above, we
ran some timing tests for simple manipulation of arrays cells and found
that arrays defined as "automatic" ran significantly slower than arrays
defined as "static". This has caused our program to crawl in certain
instances when arrays are constantly being pushed and popped from the
stack. Is there a way to configure Linux to be more efficient in this
regard, or possibly we have missed something in GCC?

Any help would be much appreciated here. Thank you for your time.

Alan


Sent via Deja.com http://www.deja.com/
Before you buy.


From backes@hlrwm.rhrk.uni-kl.de Wed Nov 15 09:06:20 2000
Received: from hlrwm.rhrk.uni-kl.de ([131.246.91.18])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13w3Cd-0008Fi-00
	for <bug-bash@gnu.org>; Wed, 15 Nov 2000 09:06:19 -0500
Received: (from backes@localhost)
	by hlrwm.rhrk.uni-kl.de (8.9.3/8.9.3) id PAA01869;
	Wed, 15 Nov 2000 15:06:16 +0100
Message-ID: <XFMail.20001115150616.backes@rhrk.uni-kl.de>
X-Mailer: XFMail 1.4.4 on Linux
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
Date: Wed, 15 Nov 2000 15:06:16 +0100 (CET)
Reply-To: Joachim Backes <backes@rhrk.uni-kl.de>
Organization: University of Kaiserslautern,
 Computer Center [Supercomputing division]
From: Joachim Backes <backes@rhrk.uni-kl.de>
To: bug-bash@gnu.org
Subject: Bug in bash-2.04 (command read)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Hi,

there seems to be a bug in the builtin command "read":

Trying

        echo 1 2 3 | read a b d

After this, I expect the values 1, 2 and 3 in the bash vars a, b and d, but all 3 vars
are left empty.

If I try:

        echo 1 2 3 >xxxxx; read <xxxxx a b d

then all is OK.

My platform: IRIX 6.5.9 or RH Linux 7.0.
Compiler: gcc 2.95.2

Regards

Joachim Backes

--

Joachim Backes <backes@rhrk.uni-kl.de>       | Univ. of Kaiserslautern
Computer Center, Supercomputing Division     | Phone: +49-631-205-2438 
D-67653 Kaiserslautern, PO Box 3049, Germany | Fax:   +49-631-205-3056 
---------------------------------------------+------------------------
WWW: http://hlrwm.rhrk.uni-kl.de/home/staff/backes.html  



From chet@nike.ins.cwru.edu Wed Nov 15 09:54:51 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13w3xb-00012V-00
	for <bug-bash@gnu.org>; Wed, 15 Nov 2000 09:54:51 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id JAA25043; Wed, 15 Nov 2000 09:54:26 -0500 (EST) (from chet)
Date: Wed, 15 Nov 2000 09:53:57 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: backes@rhrk.uni-kl.de
Subject: Re: Bug in bash-2.04 (command read)
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001115145357.AA25040.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from backes@rhrk.uni-kl.de of Wed, 15 Nov 2000 15:06:16 +0100 (CET) (id <XFMail.20001115150616.backes@rhrk.uni-kl.de>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> there seems to be a bug in the builtin command "read":

Read the Bash FAQ, question E4.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From aribiel@hrzpub.tu-darmstadt.de Thu Nov 16 05:49:48 2000
Received: from mailserver1.hrz.tu-darmstadt.de ([130.83.126.41])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wMbz-0006rU-00
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 05:49:47 -0500
Received: from server.ppp.tu-darmstadt.de (ppp356.stud.tu-darmstadt.de [130.83.176.107])
	by mailserver1.hrz.tu-darmstadt.de (8.9.1a/8.9.1) with ESMTP id LAA26260
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 11:48:41 +0100 (MET)
Received: from hrzpub.tu-darmstadt.de (localhost [127.0.0.1])
	by server.ppp.tu-darmstadt.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id eAGB1WW02542
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 12:01:32 +0100
X-Authentication-Warning: server.ppp.tu-darmstadt.de: Host localhost [127.0.0.1] claimed to be hrzpub.tu-darmstadt.de
Message-ID: <3A13BE8C.C20FA2D1@hrzpub.tu-darmstadt.de>
Date: Thu, 16 Nov 2000 12:01:32 +0100
From: Aribert Biel <aribiel@hrzpub.tu-darmstadt.de>
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org
Subject: Bug in  ${PARAMETER//PATTERN/STRING} with extglob and Pattern 
 *(PATTERN-LIST)
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM=3D'bash' -DCONF_HOSTTYPE=3D'i386'
-DCONF_OSTYPE=3D'linux' -DCONF_MACHTYPE=3D'i386-suse-uname output: Linux
server 2.2.16 #1 Mon Oct 30 11:47:05 CET 2000 i586 unknown
Machine Type: i386-suse-linux
 =

Bash Version: 2.04
Patch Level: 0
Release Status: release
 =

Description:
I tried to do things one normally uses awk for. But I need this string
manipulations on a boot-floppy, where not enough space is left for a
statically linked awk.
 =

I just want to strip   *([[:alpha:]]|[:/]) =


from a variable, so I switched on "extglob":
(actually I only want to have the numbers, but the error boiled down to
the following:)
 =

echo $temp
/dev/hda: 3907008 /dev/hdb: 9903600 /dev/sda: 2202244 total: 16012852
blocks
 =

echo ${temp//*([[:alpha:]])}
 =

Now the interactive shell hangs, consuming a lot of CPU Power. I must
kill the shell process to be able to proceed

shopt
 =

cdable_vars     off
cdspell         off
checkhash       off
checkwinsize    on
cmdhist         on
dotglob         off
execfail        off
expand_aliases  on
extglob         on
histreedit      off
histappend      off
histverify      off
hostcomplete    on
huponexit       off
interactive_comments    on
lithist         off
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nullglob        off
progcomp        on
promptvars      on
restricted_shell        off
shift_verbose   off
sourcepath      on
xpg_echo        off
 =

 =

Repeat-By:

The problem seems to be, that the Parameter Expansion
${PARAMETER//PATTERN/STRING} doesn't recognize the Pattern =

*(PATTERN-LIST)

I conclude this from: =


echo ${temp//[[:alpha:]]}       # strips all alpha chars as expected
//: 3907008 //: 9903600 //: 2202244 : 16012852
 =

with

 echo ${temp/*([[:alpha:]])}    # nothing happens
/dev/hda: 3907008 /dev/hdb: 9903600 /dev/sda: 2202244 total: 16012852
blocks
 =

and                                                                      =
    =


echo ${temp//*([[:alpha:]])}    # hangs forever
 =

 =

By the way: the following works as expected: it strips "/dev/hda1:" from
the left hand side of the parameter
 =

echo ${temp##*([[:alpha:]]|[/:])}       # works as expected
3907008 /dev/hdb: 9903600 /dev/sda: 2202244 total: 16012852 blocks  =



------------------------------------------------------------------
But nevertheless:

Thanks a lot for this great software!

I use Linux and therefor bash since two years and won=B4t go back to M$
ever                                          =


Best regards

Ari Biel


From kim@nexial.com Thu Nov 16 15:12:06 2000
Received: from ns.nexial.nl ([193.78.27.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wVO9-00005F-00
	for <bug-bash@prep.ai.MIT.Edu>; Thu, 16 Nov 2000 15:12:06 -0500
Received: (from kim@localhost)
	by ns.nexial.nl (8.9.3/8.9.3) id VAA10673;
	Thu, 16 Nov 2000 21:12:01 +0100 (MET)
Date: Thu, 16 Nov 2000 21:12:01 +0100
From: Kim Hendrikse <kim@nexial.nl>
To: bug-bash@prep.ai.MIT.Edu
Subject: History setting broken on latest bash??
Message-ID: <20001116211201.A10640@nexial.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0i
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Hi, I've always loved the "set -o vi" command history mechanism. Till
recently I've always set this in my startup file. However, on recent
versions of linux if I set this in any startup file, not only does it not
work but it then prevents it from being set manually and have it work.
I read in the manual "on non-interactive shells set -o vi ...." sort of
implying this behaviour, except although startup files are non-interactive
they are designed to setup the shell for interactive use. I get a little sick
of having to type "set -o vi" everytime I log into a new machine.

Surely this is a bug? Or is there some new way of getting that behaviour
set automatically? Or is someone just trying to make it really nifty
like a dos shell whereby you have to type "doskey" to get it as well and is thus
it really is a neat new feature ;-)

Cheers,
Kim Hendrikse
---------------------------------------------------------------
Search Holding BV/Nexial Systems. (http://www.nexial.com)
E-mail: kim@nexial.com, Tel: +31 475 342 222  Fax:  +31 475 324 484
Postbus 62, 6100 AB, Gelrestraat 75, 6101 EV, Echt, The Netherlands
GPS Co-ordinates, N 51'06.250" E005'52.097"
PGP finger print: ED C7 22 52 3B E5 24 BA  76 46 65 DA A4 0B F4 D1
---------------------------------------------------------------


From chet@nike.ins.cwru.edu Thu Nov 16 15:51:31 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wW0J-0001IN-00
	for <bug-bash@prep.ai.MIT.Edu>; Thu, 16 Nov 2000 15:51:31 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id PAA03898; Thu, 16 Nov 2000 15:51:22 -0500 (EST) (from chet)
Date: Thu, 16 Nov 2000 15:50:38 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: kim@nexial.nl
Subject: Re: History setting broken on latest bash??
Cc: bug-bash@prep.ai.MIT.Edu, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001116205038.AA03895.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from kim@nexial.nl of Thu, 16 Nov 2000 21:12:01 +0100 (id <20001116211201.A10640@nexial.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Hi, I've always loved the "set -o vi" command history mechanism. Till
> recently I've always set this in my startup file. However, on recent
> versions of linux if I set this in any startup file, not only does it not
> work but it then prevents it from being set manually and have it work.
> I read in the manual "on non-interactive shells set -o vi ...." sort of
> implying this behaviour, except although startup files are non-interactive
> they are designed to setup the shell for interactive use. I get a little sick
> of having to type "set -o vi" everytime I log into a new machine.
> 
> Surely this is a bug? Or is there some new way of getting that behaviour
> set automatically? Or is someone just trying to make it really nifty
> like a dos shell whereby you have to type "doskey" to get it as well and is thus
> it really is a neat new feature ;-)

Does the problem described in question F6 of the Bash FAQ apply?

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Thu Nov 16 15:51:47 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wW0Z-0001Il-00
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 15:51:47 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id PAA03847; Thu, 16 Nov 2000 15:48:57 -0500 (EST) (from chet)
Date: Thu, 16 Nov 2000 15:44:09 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: aribiel@hrzpub.tu-darmstadt.de
Subject: Re: Bug in  ${PARAMETER//PATTERN/STRING} with extglob and Pattern  *(PATTERN-LIST)
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001116204409.AA03830.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from aribiel@hrzpub.tu-darmstadt.de of Thu, 16 Nov 2000 12:01:32 +0100 (id <3A13BE8C.C20FA2D1@hrzpub.tu-darmstadt.de>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
>  =
> 
> Description:
> I tried to do things one normally uses awk for. But I need this string
> manipulations on a boot-floppy, where not enough space is left for a
> statically linked awk.
>  =
> 
> I just want to strip   *([[:alpha:]]|[:/]) =

No, you don't.  This will strip everything (remember, the `*' matches 0 or
more).  And, as you discovered, it exposes some really bad behavior in the
bash pattern matcher, so it will strip it slowwwwwwwwly.

> echo $temp
> /dev/hda: 3907008 /dev/hdb: 9903600 /dev/sda: 2202244 total: 16012852
> blocks
>  =
> 
> echo ${temp//*([[:alpha:]])}

Try this instead:

echo ${temp//+([[:alpha:]:\/])/}

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Thu Nov 16 16:39:45 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wWkz-0002Y9-00
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 16:39:45 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id QAA04200; Thu, 16 Nov 2000 16:38:43 -0500 (EST) (from chet)
Date: Thu, 16 Nov 2000 16:26:15 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: aribiel@hrzpub.tu-darmstadt.de, bug-bash@gnu.org
Subject: Re: Bug in  ${PARAMETER//PATTERN/STRING} with extglob and Pattern  *(PATTERN-LIST)
Cc: chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001116212615.AA04165.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from chet@nike.ins.cwru.edu of Thu, 16 Nov 2000 15:44:09 -0500 (id <1001116204409.AA03830.SM@nike.ins.cwru.edu>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Following up to my own message:

> > I just want to strip   *([[:alpha:]]|[:/]) =
> 
> No, you don't.  This will strip everything (remember, the `*' matches 0 or
> more).  And, as you discovered, it exposes some really bad behavior in the
> bash pattern matcher, so it will strip it slowwwwwwwwly.

I found and fixed the problem (and it was just with pattern substitution),
so now bash strips everything very quickly.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From mailresponse2@g7ps.com Thu Nov 16 18:38:34 2000
Received: from [63.215.254.92] (helo=GLOBALZON2.GLOBALZON2K.COM)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wYby-0005vz-00
	for <bug-bash@gnu.org>; Thu, 16 Nov 2000 18:38:34 -0500
Received: from travelthomas (63.210.161.34 [63.210.161.34]) by GLOBALZON2.GLOBALZON2K.COM with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
	id XBCC2YTG; Thu, 16 Nov 2000 15:27:51 -0800
To: bug-bash@gnu.org
From: "eNews" <mailresponse2@g7ps.com>
Subject: New PC software: VersaCheck 2001 !
Reply-To: "eNews" <mailresponse2@g7ps.com>
Date: 11/16/00 03:22:06 PM
Message-Id: <E13wYby-0005vz-00@fencepost.gnu.org>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

PRODUCT LAUNCH:

V e r s a C h e c k  2 0 0 1

CREATE AND PRINT YOUR OWN CHECKS OR - - - -
SEND & ACCEPT THEM BY EMAIL AND PRINT THEM AT YOUR DESKTOP!

The VersaCheck 2001 family of check creation and management software for PCs running Windows is 
now available at office superstores and computer retailers near you, or directly from the internet

Works with your financial software!

To start saving now and for more details click below:

http://www.g7ps.com

*** electronic news keep you informed and protect our natural resources ***

Note:
To Opt-In on future VersaCheck information, please click on the following link:  
http://www.globalzon2k.com/scripts/mfm_ae.asp?e=bug-bash@gnu.org

To Opt-Out on future VersaCheck information, please click on the following link:
http://www.globalzon2k.com/scripts/mfm_de.asp?e=bug-bash@gnu.org





From news@news.acns.nwu.edu Thu Nov 16 21:17:11 2000
Received: from news.acns.nwu.edu ([129.105.16.55])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wb5T-0001Fb-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Thu, 16 Nov 2000 21:17:11 -0500
Received: (from news@localhost)
	by news.acns.nwu.edu (8.9.3/8.9.3) id UAA01855
	for gnu-bash-bug@prep.ai.mit.edu; Thu, 16 Nov 2000 20:17:10 -0600 (CST)
To: gnu-bash-bug@prep.ai.mit.edu
Path: merle.acns.nwu.edu!nickgeo
From: Nicholas Geovanis  <nickgeo@merle.acns.nwu.edu>
Newsgroups: gnu.bash.bug
Subject: 2.04 build problem/solution for AIX 4.3.x
Date: Thu, 16 Nov 2000 20:17:09 -0600
Organization: Northwestern University, Evanston, IL, US
Lines: 45
Message-ID: <Pine.HPX.4.10.10011161959320.22738-100000@merle.acns.nwu.edu>
Reply-To: n-geovanis@nwu.edu
NNTP-Posting-Host: merle.acns.nwu.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Using IBM C and C++ Compiler 3.6.6 on AIX 4.3.2, support/mksignames.c was
core dumping when filling signal_names[] with SIGRTMAX. This turned-out to
be because SIGRTMIN was defined as 888 and SIGRTMAX at 999, both far
larger than NSIG (64). Moping through sys/signal.h, the comments state
that realtime signal constants and functions are defined for
compatibility's sake, but they are not supported (hence the apparently
arbitrary values).

I tried messing with the Posix-compatibility preprocessor defines to keep
the wacky values from being defined, but I couldn't find a combination
that worked for everything. Since mksignames seemed to be relatively
stand-alone, and since I'm no good with autoconf, I thought I'd just
modify the source. The diff is reproduced below (you can safely ignore
the #pragma). All bash test pass and I've seen no other problems in
limited use so far.

The doc states that bash 2.04 works on AIX 4.1.x and AIX 4.2.x and I know
that we built earlier versions here on those platforms, so I'm assuming
that this is a problem introduced with AIX 4.3.x. But all IBM equipment
here is now 4.3.2 or 4.3.3 so I can't test this guess. See ya...

# diff mksignames.orig.c mksignames.c
21a22
> #pragma options source showinc
34a36,38
> #if defined (_AIXVERSION_430) || defined (_AIXVERSION_431)
> char *signal_names[2 * SIGRTMAX];
> #else
35a40
> #endif
39c44,47
< #if defined (SIGRTMAX) || defined (SIGRTMIN)
---
> #if defined (_AIXVERSION_430) || defined (_AIXVERSION_431)
> #  define RTLEN 14
> #  define RTLIM SIGRTMAX
> #elif defined (SIGRTMAX) || defined (SIGRTMIN)
#

* Nick Geovanis
| IT Computing Svcs           Let's have a war,
| Northwestern Univ           We can jack-up the Dow-Jones.
| n-geovanis@nwu.edu             - Fear
+------------------->



From root@vertigo.trance.net Fri Nov 17 14:58:01 2000
Received: from dialup3-88.home.se ([212.75.66.88] helo=vertigo.trance.net)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13wre3-0000O5-00
	for <bug-bash@gnu.org>; Fri, 17 Nov 2000 14:58:00 -0500
Received: (from root@localhost)
	by vertigo.trance.net (8.9.0/8.9.0) id UAA00226;
	Fri, 17 Nov 2000 20:51:24 GMT
Date: Fri, 17 Nov 2000 20:51:24 GMT
From: root <root@vertigo.trance.net>
Message-Id: <200011172051.UAA00226@vertigo.trance.net>
To: bug-bash@gnu.org
Subject: Faulty command line editing.
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnulibc1
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnulibc1' -DCONF_MACHTYPE='i586-pc-linux-gnulibc1' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H   -I. -I//include -I. -I./include -I./lib -I//include -g -O2
uname output: Linux trance 2.0.35 #9 Fri Jan 8 16:23:28 GMT 1999 i586 unknown
Machine Type: i586-pc-linux-gnulibc1

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
If $PS1 + command line exceeds 49 chars (which is short of filling the
screen horizontally) a new line is started, but the prompter is simply
moved back to the beginning of the current line and no newline is
inserted. The next line written will however fill the screen horizontally.
The really weird things happen whenever I need to edit the command-line
though. If I backspace 'up' to the previous row, two rows are deleted
visually but not 'memorally', and then one visual row is deleted for
every char I type or delete. Every time I press any other button
but CRLF, actually.
This is ofcourse very annoying.

I'm not experiencing this problem with any other program or application.

Repeat-By:
Run SVGATextMode to get a nonstandard mode.
Make a 200 char long command line and then erase it all or try to
edit it. I guess you've already tried this without having any trouble.

If this is caused by broken code in some library somewhere, then please
tell me which one(s) so I can replace it.
Thank you for a superior scripting shell...

/Andreas Ericsson

exon@home.se


From csaa4976@dm.uibk.ac.at Sat Nov 18 05:06:35 2000
Received: from ms1.uibk.ac.at ([138.232.1.201])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13x4tG-0004Q4-00
	for <bug-bash@gnu.org>; Sat, 18 Nov 2000 05:06:34 -0500
Received: from dm.uibk.ac.at (dm.uibk.ac.at [138.232.5.50] csaa4976@dm.uibk.ac.at)
  by ms1.uibk.ac.at (8.9.3/D2) with ESMTP id LAA01668;
  Sat, 18 Nov 2000 11:06:20 +0100 (MET)
Received: from localhost (csaa4976@localhost) by dm.uibk.ac.at (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA53306; Sat, 18 Nov 2000 11:06:19 +0100 (MET)
Date: Sat, 18 Nov 2000 11:06:19 +0100
From: Wolfgang Oertl <Wolfgang.Oertl@uibk.ac.at>
To: bug-bash@gnu.org, andreas.schwab@suse.de
Subject: PATCH: make_var_array() mishandles exportstr on CYGWIN and SuSE
Message-ID: <Pine.SGI.4.10.10011181105550.6531151-100000@dm.uibk.ac.at>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' -DCONF_VENDOR='suse' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I. -I./include -I./lib -I/usr/include -O2 -m486 -D_GNU_SOURCE -Wall -pipe
uname output: Linux laptop 2.4.0-test10 #24 Tue Nov 7 22:56:09 CET 2000 i686 unknown
Machine Type: i386-suse-linux

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
	In the vanilla version this problem only arises on __CYGWIN__ and
	__CYGWIN32__ platforms.  The Bash distributed with SuSE 7.0 contains a
	patch that triggers this problem by enabling the __CYGWIN__ code in
	this function.

	During generation of 'export_env', function variables that have their
	'exportstr' set, lose.  The problem is localized to the function
	variables.c:make_var_array().

	Consider this code fragment of variables.c:make_var_array():

>       if (var->exportstr)
>         {
> #if defined(__CYGWIN__) || defined (__CYGWIN32__)
> 	  INVALIDATE_EXPORTSTR (var);
> 	  value = value_cell (var);
> #else
> 	  /* XXX -- this test can go away in the next release, to be replaced
> 	     by a simple `value = var->exportstr;', when the exportstr code
> 	     is better-tested.  Until then, don't do it for cygwin at all,
> 	     since that system has some weird environment variables. */
>         if (valid_exportstr (var))
> 	    value = var->exportstr;
> 	  else
> 	    {
> 	      INVALIDATE_EXPORTSTR (var);
> 	      value = value_cell (var);
> 	    }
> #endif
>         }

	There are some ways for 'value = value_cell (var)' to happen, which is
	bad when 'var' is a function.  Actually, 'exportstr' is set only for
	functions!

Repeat-By:
	$ function foo_func () { echo here; }
	$ export -f foo_func
	$ /bin/ls
	$ export BAR=1
	$ sh
	$ set

	/bin/ls (or whatever external command) provokes a call of
	'maybe_make_export_env', which makes 'export_env', thereby setting the
	'exportstr' of 'foo_func'.

	The second time (provoked by changing an exported variable, BAR in
	this case, and then another external command), the function
	'make_var_array' behaves badly and uses 'value_cell (var)' on the
	function variable!  Only 'function_cell (var)' must be used...  This
	results in a Bad String.

	In set's output in the subshell, the 'foo_func' is listed as a string
	variable with a content of "\t" (which is, in my setup, the result of
	using a pointer to COMMAND (4 bytes) as a string).

Fix:
	A quick fix would be to replace the instances of 'value_cell (var)' in
	the code fragment above with 'named_function_string ((char *)NULL,
	function_cell (var), 0)'.

	This would break as soon as arrays can be exported, though.  This
	patch (for the unpatched version of Bash) should yield better
	results in the long run.  It still leaves the call to
	'valid_exportstr' intact, which (IMHO) could be removed.
 
--- variables.c.orig	Thu Nov 16 00:01:30 2000
+++ variables.c	Thu Nov 16 16:55:45 2000
@@ -2492,30 +2492,33 @@
 
   list = alloc_array ((1 + array_len ((char **)vars)));
 
-#define USE_EXPORTSTR (value == var->exportstr)
-
   for (i = 0, list_index = 0; (var = vars[i]); i++)
     {
+      /* When var->exportstr is set, assume that it is up to date.  All
+       * changes to variables must therefore call INVALIDATE_EXPORTSTR.
+       */
       if (var->exportstr)
-        {
+	{
 #if defined(__CYGWIN__) || defined (__CYGWIN32__)
 	  INVALIDATE_EXPORTSTR (var);
-	  value = value_cell (var);
 #else
-	  /* XXX -- this test can go away in the next release, to be replaced
-	     by a simple `value = var->exportstr;', when the exportstr code
+	  /* XXX -- this test can go away in the next release
+	     when the exportstr code
 	     is better-tested.  Until then, don't do it for cygwin at all,
 	     since that system has some weird environment variables. */
           if (valid_exportstr (var))
-	    value = var->exportstr;
-	  else
 	    {
-	      INVALIDATE_EXPORTSTR (var);
-	      value = value_cell (var);
+	      /* Gee, I'd like to get away with not using savestring() if we're
+		 using the cached exportstr... */
+	      list[list_index++] = savestring (var->exportstr);
+	      continue;
 	    }
+	  INVALIDATE_EXPORTSTR (var);
 #endif
-        }
-      else if (function_p (var))
+	}
+
+      /* otherwise, get the current value */
+      if (function_p (var))
 	value = named_function_string ((char *)NULL, function_cell (var), 0);
 #if defined (ARRAY_VARS)
       else if (array_p (var))
@@ -2530,17 +2533,18 @@
 
       if (value)
 	{
-	  /* Gee, I'd like to get away with not using savestring() if we're
-	     using the cached exportstr... */
-	  list[list_index] = USE_EXPORTSTR ? savestring (value)
-					   : mk_env_string (var->name, value);
+	  list[list_index] = mk_env_string (var->name, value);
 
-	  if (USE_EXPORTSTR == 0 && function_p (var))
+	  /* This place is reached only if var->exportstr is NULL */
+	  if (function_p (var)
+#if defined (ARRAY_VARS) && 0
+		  || array_p (var)
+#endif
+		  )
 	    {
 	      SAVE_EXPORTSTR (var, list[list_index]);
 	    }
 	  list_index++;
-#undef USE_EXPORTSTR
 
 #if 0	/* not yet */
 #if defined (ARRAY_VARS)
	


Details
=======

Of course the same happens when a shell script defines and exports functions,
and then calls other scripts (that was how I noticed it).


The first time 'maybe_make_export_env' is called (with array_needs_making
set), the shell variable for 'func' looks like this (in gdb):

$41 = {name = 0x80d53ac "func", value = 0x80d684c "\t", exportstr = 0x0, dynamic_value = 0,
  assign_func = 0, attributes = 33, context = 0, prev_context = 0x0}

The second time:

$43 = {name = 0x80d53ac "func", value = 0x80d684c "\t",
  exportstr = 0x80d694c "func=() {  echo \"here is the function\"\n}", dynamic_value = 0,
  assign_func = 0, attributes = 33, context = 0, prev_context = 0x0}


As you can see, the only difference is that 'exportstr' is already computed.

The function make_var_array() looks like this in my installed Bash.
(It includes a patch at this point, enabling the #if defined __CYGWIN__ part,
by andreas.schwab@suse.de, dated 2000/03/27.  Without the patch the problem
wouldn't arise, and INVALIDATE_EXPORTSTR wouldn't be called.)

> #define USE_EXPORTSTR (value == var->exportstr)
>  
>   for (i = 0, list_index = 0; (var = vars[i]); i++)
>     {
>       if (var->exportstr)
>         {
>           INVALIDATE_EXPORTSTR (var);
>           value = value_cell (var);
>         }
>       else if (function_p (var))
>         value = named_function_string ((char *)NULL, function_cell (var), 0);
> #if defined (ARRAY_VARS)
>       else if (array_p (var))
> #  if 0
>         value = array_to_assignment_string (array_cell (var));
> #  else
>         continue;       /* XXX array vars cannot yet be exported */
> #  endif
> #endif
>       else
>         value = value_cell (var);

exportstr is used only for functions: the only time SAVE_EXPORTSTR is called
is in this very function, enclosed by an if(function_p()) predicate.

What follows is that when var->exportstr is set (only for functions), you end
up with 'value = value_cell (var)', which is *not* what you want...  This in
fact uses the pointer to a COMMAND structure as a string.

end



From news@reader1-nwblwi.newsops.execpc.com Sat Nov 18 14:06:12 2000
Received: from reader1-nwblwi.newsops.execpc.com ([169.207.30.41])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xDJU-0005Ho-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sat, 18 Nov 2000 14:06:12 -0500
Received: (from news@localhost)
	by reader1-nwblwi.newsops.execpc.com (8.9.3/8.9.3) id NAA86700;
	Sat, 18 Nov 2000 13:06:11 -0600 (CST)
	(envelope-from news)
To: gnu-bash-bug@prep.ai.mit.edu
From: "Mike" <jedi@hotmail.com>
Newsgroups: gnu.bash.bug
Subject: Setting a command line parameter; $1="new Value"
Date: Sat, 18 Nov 2000 13:05:38 -0600
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Lines: 9
Message-ID: <3a16d322$0$78552$272ea4a1@news.execpc.com>
Organization: ExecPC Internet - Milwaukee, WI
NNTP-Posting-Host: 32cd331d.news.execpc.com
X-Trace: DXC=WFR4o5RGcd\bV?_m\CJ]DV`<WTGT>OiB^bCigiU>8_hX4`>8YbCYbk]WFCBD>\GGEVlD=NV0VOVDUbMoK;UJ;AoX
X-Complaints-To: abuse@execpc.com
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

I passed in a command line, but i want to set it to a new value... How can I
do this? The reason why I want to do this is that I might get $1 = My long
phrase

But I want to turn $1 = "My long phrase"

Thanks!




From news@server1.reno.powernet.net Sun Nov 19 02:41:52 2000
Received: from mailbox2.ucsd.edu ([132.239.1.54])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xP6l-000769-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 19 Nov 2000 02:41:51 -0500
Received: from server1.reno.powernet.net (server1.reno.powernet.net [216.88.152.250])
	by mailbox2.ucsd.edu (8.11.0/8.11.0) with ESMTP id eAJ7hVv09698
	for <gnu-bash-bug@moderators.isc.org>; Sat, 18 Nov 2000 23:43:31 -0800 (PST)
Received: by server1.reno.powernet.net (8.9.3/8.9.3) id XAA22285
	for gnu-bash-bug@moderators.isc.org; Sat, 18 Nov 2000 23:41:49 -0800 (PST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "VP Anti-Spam Campain" <ahamember@hotmail.com>
Newsgroups: gnu.bash.bug
Subject: To stop spamming we must unite!  Please Read
Date: 19 Nov 2000 07:41:49 GMT
Organization: A-HA
Lines: 10
Message-ID: <36848.9863409722@news.powernet.net>
NNTP-Posting-Host: p0-25.lasvegas.powernet.net
X-Trace: server1.reno.powernet.net 974619709 28123 208.226.191.55 (19 Nov 2000 07:41:49 GMT)
X-Complaints-To: usenet@POWERNET.NET
NNTP-Posting-Date: 19 Nov 2000 07:41:49 GMT
X-Newsreader: Post News
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

AHA is working hard to get legislation passed to 
stop spamming and unsolicited bulk emailing.

We need your help!
Please send your donations to 

AHA Funds – Anti-Spam fund
284-C East Lake Mead Drive #103
Henderson, NV 89015-5582



From portfolio_builder@yahoo.com Sun Nov 19 19:38:50 2000
Received: from 24129180hfc75.tampabay.rr.com ([24.129.180.75] helo=yahoo.com)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13xeyh-0005kM-00; Sun, 19 Nov 2000 19:38:36 -0500
From:  <portfolio_builder@yahoo.com>
Subject: Increase your portfolio size !
Date: Sun, 19 Nov 2000 19:39:01
Message-Id: <365.115459.502965@yahoo.com>
Reply-To: portfolio_add@yahoo.com
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0beta6
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: http://mail.gnu.org/pipermail/bug-bash/

THE DOUBLER  -  
NEW BUY OPINION: European American Resources, Inc. 
Symbol: EPAR (OTCBB)
Recent Price - $.375 52 Week Range - $.21875 - $1.6875 
Estimated Float - 5.9 Million Shares Outstanding -
16.2 Million Shares 

Gold mining stocks have been a neglected group during
this great Bull Market.  Many financial advisors
suggest putting a small percentage of a portfolio
(3-10%) into precious metals as a hedge against
inflation.  With oil prices hitting multi-year highs,
we are advising purchase of European American
Resources (EPAR), currently trading near the low for
the year.

EPAR'S largest property in Nevada is located
right between two successful gold mines operated by
Homestake Mining (HM-NYSE-5 5/8), one of the top gold
companies in North America.  EPAR recently agreed to a
joint venture with HM, where Homestake is financing
100% of the drilling costs.  If the digging is
promising, European American could be a takeover
candidate at a high multiple to the current price.  In
fact, HM has acquired three of the last five companies
that they entered into similar joint ventures with. 
Also, Nevada is known as one of the lowest-cost areas
to mine gold, and EPAR'S Prospect Mountain property is
right next door to HM'S Ruby Hill, which runs at a
rock bottom cost of $64 per ounce to mine gold.

Our philosophy is to buy stocks with the potential of
doubling over a short-term period.  After they reach
the doubling point, we advise selling half of your
position, so the remaining shares are in your
portfolio on a "FREE" basis.  We recommend buying EPAR
at any price up to $1.50 per share.

DISCLAIMER: 
The Doubler has received a fee of 5000 shares of
European American Resources, Inc. 
common stock for the writing and distribution of this
report. The Doubler and/or 
its affiliates currently own shares of EPAR, and may
buy or sell shares at any 
time after the dissemination of this report. Because
the publisher owns this stock, there may be a conflict
of interest in The Doubler's statements and opinions. The 
Doubler is not a registered investment advisor,
broker or dealer. Purchase of this 
stock may be considered speculative, and may result in
the loss of some or all of any investment made. 


If you would like to be included in our mailing list to receive information regarding possible stock possibilites, e-mail us at portfolio_add@yahoo.com or print out this letter, fill in the blanks and fax us at (727) 942-0341.


Name_________________

E-mail Address ________________

Telephone Number: (     )___ - _____

If you would like to be removed from our mailing list, please e-mail us at portfolio_delete@yahoo.com


From mike@tecc.co.uk Wed Nov 22 11:51:28 2000
Received: from luggage.tecc.co.uk ([193.128.6.129] helo=relay.tecc.co.uk)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13yd7H-0000A0-00
	for <bug-bash@gnu.org>; Wed, 22 Nov 2000 11:51:27 -0500
Received: from fw-smtp.tecc.co.uk [195.217.37.39] 
	by relay.tecc.co.uk with esmtp (Exim 1.70 #1)
	id 13yd7C-0002Wx-00; Wed, 22 Nov 2000 16:51:22 +0000
Received: from handbag.tecc.co.uk ([195.217.37.39] ident=mike)
	by fw-smtp.tecc.co.uk with esmtp (Exim 2.12 #3)
	id 13yd67-0002WF-00; Wed, 22 Nov 2000 16:50:15 +0000
From: Mike Taylor <mike@tecc.co.uk>
To: chet@po.CWRU.Edu
CC: bug-bash@gnu.org
In-reply-to: <1001122161627.AA70269.SM@nike.ins.cwru.edu> (message from Chet
	Ramey on Wed, 22 Nov 2000 11:16:27 -0500)
Subject: Re: Case-Insensitive Globbing
References:  <1001122161627.AA70269.SM@nike.ins.cwru.edu>
Message-Id: <E13yd67-0002WF-00@fw-smtp.tecc.co.uk>
Date: Wed, 22 Nov 2000 16:50:15 +0000
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> Date: Wed, 22 Nov 2000 11:16:27 -0500
> From: Chet Ramey <chet@nike.ins.cwru.edu>
> 
> > A suggestion: in these days when we all have a lot of files with names
> > like "04. Fade to Black.mp3" and "04. Fade To Black.mp3" and indeed
> > "04. FADE TO BLACK.MP3", it would be nice if Bash included a way to
> > make a globbing-pattern match case-insensitively, so I can say (for
> > example):
> 
> What's wrong with `shopt -s nocaseglob'?

Duuuh.  I _knew_ it had to be in there somewhere!

My apologies, the man-page I read was on a Red Hat 6.0 system, which
has bash 1.14.7(1) as its default bash; so no mention of "shopt".  Of
course, it turns out that Red Hat 6.0 also includes a binary called
"bash2" which is 2.03.4(1) ...

The upshot is, I should be using the semi-hidden newer bash.

Thanks for the pointer.

	Mike Taylor <mike@tecc.co.uk>
	http://www.miketaylor.org.uk/



From chet@granite.ins.cwru.edu Mon Nov 20 10:00:14 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xsQW-00073c-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 20 Nov 2000 10:00:12 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA12717; Mon, 20 Nov 2000 10:00:02 -0500 (EST) (from chet)
Message-Id: <200011201500.KAA12717@granite.INS.CWRU.Edu>
Date: Mon, 20 Nov 2000 10:00:02 -0500 (EST)
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@prep.ai.mit.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.9)
Reply-To: chet@po.cwru.edu
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Thu May 18 13:08:48 EDT 2000
FAQ-Version: 3.9
Bash-Version: 2.04
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)

This is the Bash FAQ, version 3.9, for Bash version 2.04.

This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell.  Bash is a freely-available command
interpreter with advanced features for both interactive use and shell
programming.

Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.

Questions and comments concerning this document should be sent to
chet@po.cwru.edu.

This document is available for anonymous FTP with the URL

ftp://ftp.cwru.edu/pub/bash/FAQ

The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html

----------
Contents:

Section A:  The Basics

A1) What is it?
A2) What's the latest version?
A3) Where can I get it?
A4) On what machines will bash run?
A5) Will bash run on operating systems other than Unix?
A6) How can I build bash with gcc?
A7) How can I make bash my login shell?
A8) I just changed my login shell to bash, and now I can't FTP into my
    machine.  Why not?
A9) What's the `POSIX 1003.2 standard'?
A10) What is the bash `posix mode'?

Section B:  The latest version

B1) What's new in version 2.04?
B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?
C2) How does bash differ from the Korn shell, version ksh88?
C3) Which new features in ksh-93 are not in bash, and which are?

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?
D2) Why doesn't bash treat brace expansions exactly like csh?
D3) Why doesn't bash have csh variable modifiers?
D4) How can I make my csh aliases work when I convert to bash?
D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?
D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

Section E:  Why does bash do certain things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?
E2) Why does bash sometimes say `Broken pipe'?
E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?
E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?
E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?
E6) Why doesn't a while or for loop get suspended when I type ^Z?
E7) What about empty for loops in Makefiles?
E8) Why does the arithmetic evaluation code complain about `08'?

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?
F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?
F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?
F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?
F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?
F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?
G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?
G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?
G4) How can I make the bash `time' reserved word print timing output that
    looks like the output from my system's /usr/bin/time?
G5) How do I get the current directory into my prompt?
G6) How can I rename "*.foo" to "*.bar"?
G7) How can I translate a filename from uppercase to lowercase?
G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?
H2) What kind of bash documentation is there?
H3) What's coming in future versions?
H4) What's on the bash `wish list'?
H5) When will the next release appear?

----------
Section A:  The Basics

A1)  What is it?

Bash is a Unix command interpreter (shell).  It is an implementation of
the Posix 1003.2 shell standard, and resembles the Korn and System V
shells.

Bash contains a number of enhancements over those shells, both
for interactive use and shell programming.  Features geared
toward interactive use include command line editing, command
history, job control, aliases, and prompt expansion.  Programming
features include additional variable expansions, shell
arithmetic, and a number of variables and options to control
shell behavior.

Bash was originally written by Brian Fox of the Free Software
Foundation.  The current developer and maintainer is Chet Ramey
of Case Western Reserve University.

A2)  What's the latest version?

The latest version is 2.04, first made available on Friday, 17 March 2000.

A3)  Where can I get it?

Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors.  The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 2.04:

ftp://ftp.gnu.org/pub/gnu/bash/bash-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.04.tar.gz

Formatted versions of the documentation are available with the URLs:

ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.04.tar.gz

A4)  On what machines will bash run?

Bash has been ported to nearly every version of UNIX.  All you
should have to do to build it on a machine for which a port
exists is to type `configure' and then `make'.  The build process
will attempt to discover the version of UNIX you have and tailor
itself accordingly, using a script created by GNU autoconf.

More information appears in the file `INSTALL' in the distribution.

A5) Will bash run on operating systems other than Unix?

Configuration specifics for Unix-like systems such as QNX and
LynxOS are included in the distribution.  Bash-2.04 should 
compile and run on Minix 2.0 (patches were contributed), but I
don't believe anyone has built bash-2.x on earlier Minix versions
yet.

Bash has been ported to versions of Windows implementing the Win32
programming interface.  This includes Windows 95 and Windows NT.
The port was done by Cygnus Solutions as part of their CYGWIN
project.  For more information about the project, look at the URL

http:/sourceware.cygnus.com/cygwin

Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases.  Cygnus has also done a
port of bash-2.02.1 to the CYGWIN environment, and it is available as
part of their current release.  (They may have upgraded by now.)

Bash-2.04 should require no local Cygnus changes to build and run under
CYGWIN.

The Cygnus port works only on Intel machines.  There is a port of bash
(I don't know which version) to the alpha/NT environment available from

ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz

Softway Systems has ported bash-2.01 to their Interix (nee OpenNT)
system, a Unix subsystem for NT that replaces the Microsoft POSIX
subsystem.  Check out http://www.interix.com for more information.
Some support for Interix has been incorporated into bash, beginning
with Bash-2.03.  It should be easier to build bash on Interix now,
but Interix users should fetch

ftp://ftp.interix.com/pub/tw/unsup/bash.diffs.tar.gz

and read the README.OpenNT file in that archive.  It will detail the
arguments `configure' needs to build on Interix.  A configure cache
file for Interix is in the bash distribution in cross-build/opennt.cache;
copy that to `config.cache' before starting configure.

DJ Delorie has a port of bash-1.14.7 which runs under MS-DOS, as part
of the DJGPP project.  For more information on the project, see

http://www.delorie.com/djgpp/

I have been told that the original DJGPP port was done by Daisuke Aoyama.

I picked up a binary of bash-1.14.7 that is purported to work with
the DJGPP V2 environment from

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147b.zip

The corresponding source is

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147s.zip

Mark Elbrecht <snowball3@bigfoot.com> has sent me notice that bash-2.03
has become available for DJGPP V2.  The files are available as:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203b.zip	binary
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203d.zip	documentation
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203s.zip	source

Mark has begun to work with bash-2.04.

Ports of bash-1.12 and bash-2.0 are available for OS/2 from

ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash_112.zip
ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash-2.0(253).zip

I haven't looked at either, but the second appears to be a binary-only
distribution.  Beware.

I have received word that Bash (I'm not sure which version, but I
believe that it's at least bash-2.02.1) is the standard shell on
BeOS.

A6) How can I build bash with gcc? 

Bash configures to use gcc by default if it is available.  Read the
file INSTALL in the distribution for more information.

A7)  How can I make bash my login shell?

Some machines let you use `chsh' to change your login shell.  Other
systems use `passwd -s' or `passwd -e'.  If one of these works for
you, that's all you need.  Note that many systems require the full
pathname to a shell to appear in /etc/shells before you can make it
your login shell.  For this, you may need the assistance of your
friendly local system administrator. 

If you cannot do this, you can still use bash as your login shell, but
you need to perform some tricks.  The basic idea is to add a command
to your login shell's startup file to replace your login shell with
bash.

For example, if your login shell is csh or tcsh, and you have installed
bash in /usr/gnu/bin/bash, add the following line to ~/.login:

	if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login

(the `--login' tells bash that it is a login shell).

It's not a good idea to put this command into ~/.cshrc, because every
csh you run without the `-f' option, even ones started to run csh scripts,
reads that file.  If you must put the command in ~/.cshrc, use something
like

	if ( $?prompt ) exec /usr/gnu/bin/bash --login

to ensure that bash is exec'd only when the csh is interactive.

If your login shell is sh or ksh, you have to do two things.

First, create an empty file in your home directory named `.bash_profile'.
The existence of this file will prevent the exec'd bash from trying to
read ~/.profile, and re-execing itself over and over again.  ~/.bash_profile
is the first file bash tries to read initialization commands from when
it is invoked as a login shell.

Next, add a line similar to the above to ~/.profile:

        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login

This will cause login shells to replace themselves with bash running as
a login shell.  Once you have this working, you can copy your initialization
code from ~/.profile to ~/.bash_profile.

I have received word that the recipe supplied above is insufficient for
machines running CDE.  CDE has a maze of twisty little startup files, all
slightly different.

If you cannot change your login shell in the password file to bash, you
will have to (apparently) live with CDE using the shell in the password
file to run its startup scripts.  If you have changed your shell to bash,
there is code in the CDE startup files (on Solaris, at least) to do the
right thing. 

`dtterm' claims to use $SHELL as the default program to start, so if you
can change $SHELL in the CDE startup files, you should be able to use bash
in your terminal windows.

Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program
to read your login shell's startup files.  You may be able to use bash for
the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as
well, but I have not tried this.

You can use the above `exec' recipe to start bash when not logging in with
CDE by testing the value of the DT variable:

	if [ -n "$DT" ]; then
	        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
	fi


A8) I just changed my login shell to bash, and now I can't FTP into my
   machine.  Why not?

You must add the full pathname to bash to the file /etc/shells.  As
noted in the answer to the previous question, many systems require
this before you can make bash your login shell. 

Most versions of ftpd use this file to prohibit `special' users
such as `uucp' and `news' from using FTP. 

A9)  What's the `POSIX 1003.2 standard'?

POSIX is a name originally coined by Richard Stallman for a
family of open system standards based on UNIX.  There are a
number of aspects of UNIX under consideration for
standardization, from the basic system services at the system
call and C library level to applications and tools to system
administration and management.  Each area of standardization is
assigned to a working group in the 1003 series. 

The POSIX Shell and Utilities standard has been developed by IEEE
Working Group 1003.2 (POSIX.2).  It concentrates on the command
interpreter interface and utility programs commonly executed from
the command line or by other programs.  An initial version of the
standard has been approved and published by the IEEE, and work is
currently underway to update it. 

Bash is concerned with the aspects of the shell's behavior
defined by POSIX.2.  The shell command language has of course
been standardized, including the basic flow control and program
execution constructs, I/O redirection and pipelining, argument
handling, variable expansion, and quoting. 

The `special' builtins, which must be implemented as part of the
shell to provide the desired functionality, are specified as
being part of the shell; examples of these are `eval' and
`export'.  Other utilities appear in the sections of POSIX.2 not
devoted to the shell which are commonly (and in some cases must
be) implemented as builtin commands, such as `read' and `test'. 
POSIX.2 also specifies aspects of the shell's interactive
behavior as part of the UPE, including job control and command
line editing.  Only vi-style line editing commands have been
standardized; emacs editing commands were left out due to
objections.

A10)  What is the bash `posix mode'?

Although bash is an implementation of the POSIX.2 shell
specification, there are areas where the bash default behavior
differs from that spec.  The bash `posix mode' changes the bash
behavior in these areas so that it obeys the spec more closely. 

Posix mode is entered by starting bash with the --posix option or
executing `set -o posix' after bash is running.

The specific aspects of bash which change when posix mode is
active are listed in the file CWRU/POSIX.NOTES in the bash
distribution.  They are also listed in a section in the Bash
Reference Manual.

Section B:  The latest version

B1) What's new in version 2.04?

Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
distribution):

o Programmable word completion with the new `complete' and `compgen' builtins;
  examples are provided in examples/complete/complete-examples
o `history' has a new `-d' option to delete a history entry
o `bind' has a new `-x' option to bind key sequences to shell commands
o The prompt expansion code has new `\j' and `\l' escape sequences
o The `no_empty_cmd_completion' shell option, if enabled, inhibits
  command completion when TAB is typed on an empty line
o `help' has a new `-s' option to print a usage synopsis
o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
o New ksh93-style arithmetic for command:
	for ((expr1 ; expr2; expr3 )); do list; done
o `read' has new options: `-t', `-n', `-d', `-s'
o The redirection code handles several filenames specially:  /dev/fd/N,
  /dev/stdin, /dev/stdout, /dev/stderr
o The redirection code now recognizes /dev/tcp/HOST/PORT and
  /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
  to the specified port on the specified host
o The ${!prefix*} expansion has been implemented
o A new FUNCNAME variable, which expands to the name of a currently-executing
  function
o The GROUPS variable is no longer readonly
o A new shopt `xpg_echo' variable, to control the behavior of echo with
  respect to backslash-escape sequences at runtime
o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned

The version of Readline released with Bash-2.04, Readline-4.1, has several
new features as well:

o Parentheses matching is always compiled into readline, and controllable
  with the new `blink-matching-paren' variable
o The history-search-forward and history-search-backward functions now leave
  point at the end of the line when the search string is empty, like
  reverse-search-history, and forward-search-history
o A new function for applications:  rl_on_new_line_with_prompt()
o New variables for applications:  rl_already_prompted, and rl_gnu_readline_p


A short feature history dating from bash-2.0:

Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes.  A number of new
features were added to Readline, mostly at the request of the Cygnus
folks.

A new shopt option, `restricted_shell', so that startup files can test
	whether or not the shell was started in restricted mode
Filename generation is now performed on the words between ( and ) in
	compound array assignments (this is really a bug fix)
OLDPWD is now auto-exported, as POSIX.2 requires
ENV and BASH_ENV are read-only variables in a restricted shell
Bash may now be linked against an already-installed Readline library,
	as long as the Readline library is version 4 or newer
All shells begun with the `--login' option will source the login shell
	startup files, even if the shell is not interactive

There were lots of changes to the version of the Readline library released
along with Bash-2.03.  For a complete list of the changes, read the file
CHANGES in the Bash-2.03 distribution.

Bash-2.02 contained the following new features:

a new version of malloc (based on the old GNU malloc code in previous
	bash versions) that is more page-oriented, more conservative
	with memory usage, does not `orphan' large blocks when they
	are freed, is usable on 64-bit machines, and has allocation
	checking turned on unconditionally
POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
POSIX.2-style globbing equivalence classes
POSIX.2-style globbing collating symbols
the ksh [[...]] extended conditional command
the ksh egrep-style extended pattern matching operators
a new `printf' builtin
the ksh-like $(<filename) command substitution, which is equivalent to
	$(cat filename)
new tilde prefixes that expand to directories from the directory stack
new `**' arithmetic operator to do exponentiation
case-insensitive globbing (filename expansion)
menu completion a la tcsh
`magic-space' history expansion function like tcsh
the readline inputrc `language' has a new file inclusion directive ($include)

Bash-2.01 contained only a few new features:

new `GROUPS' builtin array variable containing the user's group list
new bindable readline commands: history-and-alias-expand-line and
	alias-expand-line

Bash-2.0 contained extensive changes and new features from bash-1.14.7.
Here's a short list:

new `time' reserved word to time pipelines, shell builtins, and
	shell functions
one-dimensional arrays with a new compound assignment statement,
        appropriate expansion constructs and modifications to some
	of the builtins (read, declare, etc.) to use them
new quoting syntaxes for ANSI-C string expansion and locale-specific
	string translation
new expansions to do substring extraction, pattern replacement, and
	indirect variable expansion
new builtins: `disown' and `shopt'
new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
	       MACHTYPE, BASH_VERSINFO
special handling of many unused or redundant variables removed
	(e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
dynamic loading of new builtin commands; many loadable examples provided
new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
history and aliases available in shell scripts
new readline variables: enable-keypad, mark-directories, input-meta,
	visible-stats, disable-completion, comment-begin
new readline commands to manipulate the mark and operate on the region
new readline emacs mode commands and bindings for ksh-88 compatibility
updated and extended builtins
new DEBUG trap
expanded (and now documented) restricted shell mode

implementation stuff:	
autoconf-based configuration
nearly all of the bugs reported since version 1.14 have been fixed
most builtins converted to use builtin `getopt' for consistency
most builtins use -p option to display output in a reusable form
	(for consistency)
grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded

B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?

This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell.  The bash manual page explains these more
completely.

Things bash has that sh does not:
	long invocation options
	`!' reserved word to invert pipeline return value
	`time' reserved word to time pipelines and shell builtins
	the `function' reserved word
	the `select' compound command and reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	new $'...' and $"..." quoting
	the $(...) form of command substitution
	the $(<filename) form of command substitution, equivalent to
		$(cat filename)
	the ${#param} parameter value length operator
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
	expansion of positional parameters beyond $9 with ${num}
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
		   TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
		   LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
		   ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
		   HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
		   PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
		   SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
		   auto_resume
	DEBUG trap
	variable arrays with new compound assignment syntax
	redirections: <>, &>, >|
	prompt string special char translation and variable expansion
	auto-export of variables in initial environment
	command search finds functions before builtins
	bash return builtin will exit a file sourced with `.'
	builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -p.
		  export -n/-f/-p/name=value, pwd -L/-P,
		  read -e/-p/-a/-t/-n/-d/-s,
		  readonly -a/-f/name=value, trap -l, set +o,
		  set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
		  unset -f/-v, ulimit -m/-p/-u,
		  type -a/-p/-t, suspend -f, kill -n,
		  test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
	bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
	bash restricted shell mode is more extensive
	bash allows functions and variables with the same name
	brace expansion
	tilde expansion
	arithmetic expansion with $((...)) and `let' builtin
	the `[[...]]' extended conditional command
	process substitution
	aliases and alias/unalias builtins
	local variables in functions and `local' builtin
	readline and command-line editing with programmable completion
	command history and history/fc builtins
	csh-like history expansion
	other new bash builtins: bind, command, compgen, complete, builtin,
				 declare/typeset, dirs, enable, fc, help,
				 history, logout, popd, pushd, disown, shopt,
				 printf
	exported functions
	filename generation when using output redirection (command >a*)
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	variable assignments preceding commands affect only that command,
		even for builtins and functions
	posix mode
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
		/dev/tcp/host/port, /dev/udp/host/port

Things sh has that bash does not:
	uses variable SHACCT to do shell accounting
	includes `stop' builtin (bash can use alias stop='kill -s STOP')
	`newgrp' builtin
	turns on job control if called as `jsh'
	$TIMEOUT (like bash $TMOUT)
	`^' is a synonym for `|'
	new SVR4.2 sh builtins: mldmode, priv

Implementation differences:
	redirection to/from compound commands causes sh to create a subshell
	bash does not allow unbalanced quotes; sh silently inserts them at EOF
	bash does not mess with signal 11
	sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100
	bash splits only the results of expansions on IFS, using POSIX.2
		field splitting rules; sh splits all words on IFS
	sh does not allow MAILCHECK to be unset (?)
	sh does not allow traps on SIGALRM or SIGCHLD
	bash allows multiple option arguments when invoked (e.g. -x -v);
		sh allows only a single option argument (`sh -x -v' attempts
		to open a file named `-v', and, on SunOS 4.1.4, dumps core.
		On Solaris 2.4 and earlier versions, sh goes into an infinite
		loop.)
	sh exits a script if any builtin fails; bash exits only if one of
		the POSIX.2 `special' builtins fails

C2)  How does bash differ from the Korn shell, version ksh88?

Things bash has or uses that ksh88 does not:
	long invocation options
	`!' reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	posix mode and posix conformance
	command hashing
	tilde expansion for assignment statements that look like $PATH
	process substitution with named pipes if /dev/fd is not available
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
		   TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
		   HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
		   IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
		   PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
		   GROUPS, FUNCNAME, histchars, auto_resume
	prompt expansion with backslash escapes and command substitution
	redirection: &> (stdout and stderr)
	more extensive and extensible editing and programmable completion
	builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
		  exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
		  jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
		  read -e/-p/-a/-t/-n/-d/-s, readonly -a/-n/-f/-p,
		  set -o braceexpand/-o histexpand/-o interactive-comments/
		  -o notify/-o physical/-o posix/-o hashall/-o onecmd/
		  -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
		  typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
		  disown, printf, complete, compgen
	`!' csh-style history expansion
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	`**' arithmetic operator to do exponentiation
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr

Things ksh88 has or uses that bash does not:
	tracked aliases
	variables: ERRNO, FPATH, EDITOR, VISUAL
	co-processes (|&, >&p, <&p)
	weirdly-scoped functions
	typeset +f to list all function names without definitions
	text of command history kept in a file, not memory
	builtins: alias -x, cd old new, fc -e -, newgrp, print,
		  read -p/-s/-u/var?prompt, set -A/-o gmacs/
		  -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s,
		  typeset -H/-L/-R/-A/-ft/-fu/-fx/-l/-u/-t, whence

Implementation differences:
	ksh runs last command of a pipeline in parent shell context
	bash has brace expansion by default (ksh88 compile-time option)
	bash has fixed startup file for all interactive shells; ksh reads $ENV
	bash has exported functions
	bash command search finds functions before builtins

C3)  Which new features in ksh-93 are not in bash, and which are?

New things in ksh-93 not in bash-2.04:
	associative arrays
	floating point arithmetic
	math library functions
	${!name[sub]} name of subscript for associative array
	`.' is allowed in variable names to create a hierarchical namespace
	more extensive compound assignment syntax
	discipline functions
	`sleep' and `getconf' builtins (bash has loadable versions)
	typeset -n and `nameref' variables
	KEYBD trap
	variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
		   .sh.name, .sh.subscript, .sh.value, HISTEDIT
	backreferences in pattern matching
	print -f (bash uses printf)
	`fc' has been renamed to `hist'
	`.' can execute shell functions

New things in ksh-93 present in bash-2.04:
        for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
        ?:, ++, --, `expr1 , expr2' arithmetic operators
	expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]},
		    ${!param*}
	compound array assignment
	the `!' reserved word
	loadable builtins -- but ksh uses `builtin' while bash uses `enable'
	`command', `builtin', `disown' builtins
	new $'...' and $"..." quoting
	FIGNORE (but bash uses GLOBIGNORE), HISTCMD
	set -o notify/-C
	changes to kill builtin
	read -A (bash uses read -a)
        read -t/-d
	trap -p
	exec -c/-a
	`.' restores the positional parameters when it completes
	POSIX.2 `test'
	umask -S
	unalias -a
	command and arithmetic substitution performed on PS1, PS4, and ENV
	command name completion
	ENV processed only for interactive shells

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?

On many systems, `which' is actually a csh script that assumes
you're running csh.  In tcsh, `which' and its cousin `where'
are builtins.  On other Unix systems, `which' is a perl script
that uses the PATH environment variable.

The csh script version reads the csh startup files from your
home directory and uses those to determine which `command' will
be invoked.  Since bash doesn't use any of those startup files,
there's a good chance that your bash environment differs from
your csh environment.  The bash `type' builtin does everything
`which' does, and will report correct results for the running
shell.  If you're really wedded to the name `which', try adding
the following function definition to your .bashrc:

	which()
	{
		builtin type "$@"
	}

If you're moving from tcsh and would like to bring `where' along
as well, use this function:

	where()
	{
		builtin type -a "$@"
	}

D2) Why doesn't bash treat brace expansions exactly like csh?

The only difference between bash and csh brace expansion is that
bash requires a brace expression to contain at least one unquoted
comma if it is to be expanded.  Any brace-surrounded word not
containing an unquoted comma is left unchanged by the brace
expansion code.  This affords the greatest degree of sh
compatibility. 

Bash, ksh, zsh, and pd-ksh all implement brace expansion this way. 

D3) Why doesn't bash have csh variable modifiers?

Posix has specified a more powerful, albeit somewhat more cryptic,
mechanism cribbed from ksh, and bash implements it.

${parameter%word}
        Remove smallest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the suffix matched by the pattern deleted.

        x=file.c
        echo ${x%.c}.o
        -->file.o

${parameter%%word}

        Remove largest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the suffix matched by the pattern deleted.

        x=posix/src/std
        echo ${x%%/*}
        -->posix

${parameter#word}
        Remove smallest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the prefix matched by the pattern deleted.

        x=$HOME/src/cmd
        echo ${x#$HOME}
        -->/src/cmd

${parameter##word}
        Remove largest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the prefix matched by the pattern deleted.

        x=/one/two/three
        echo ${x##*/}
        -->three


Given
	a=/a/b/c/d
	b=b.xxx

	csh			bash		result
	---			----		------
	$a:h			${a%/*}		   /a/b/c
	$a:t			${a##*/}	   d
	$b:r			${b%.*}		   b
	$b:e			${b##*.}	   xxx


D4) How can I make my csh aliases work when I convert to bash?

Bash uses a different syntax to support aliases than csh does. 
The details can be found in the documentation.  We have provided
a shell script which does most of the work of conversion for you;
this script can be found in ./examples/misc/alias-conv.sh.  Here is
how you use it:
  
Start csh in the normal way for you.  (e.g., `csh')
  
Pipe the output of `alias' through `alias-conv.sh', saving the
results into `bash_aliases':
  
	alias | alias-conv.sh >bash_aliases
  
Edit `bash_aliases', carefully reading through any created
functions.  You will need to change the names of some csh specific
variables to the bash equivalents.  The script converts $cwd to
$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt
to $PS1.  You may also have to add quotes to avoid unwanted
expansion.

For example, the csh alias:
  
	alias cd 'cd \!*; echo $cwd'
  
is converted to the bash function:

	cd () { command cd "$@"; echo $PWD ; }

The only thing that needs to be done is to quote $PWD:
  
	cd () { command cd "$@"; echo "$PWD" ; }
  
Merge the edited file into your ~/.bashrc.

There is an additional, more ambitious, script in
examples/misc/cshtobash that attempts to convert your entire csh
environment to its bash equivalent.  This script can be run as
simply `cshtobash' to convert your normal interactive
environment, or as `cshtobash ~/.login' to convert your login
environment. 

D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?

Use
	command 2>&1 | command2

The key is to remember that piping is performed before redirection, so
file descriptor 1 points to the pipe when it is duplicated onto file
descriptor 2.

D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

There are features in ksh-88 and ksh-93 that do not have direct bash
equivalents.  Most, however, can be emulated with very little trouble.

ksh-88 feature		Bash equivalent
--------------		---------------
compiled-in aliases	set up aliases in .bashrc; some ksh aliases are
			bash builtins (hash, history, type)
coprocesses		named pipe pairs (one for read, one for write)
typeset +f		declare -F
cd, print, whence	function substitutes in examples/functions/kshenv
autoloaded functions	examples/functions/autoload is the same as typeset -fu
read var?prompt		read -p prompt var

ksh-93 feature		Bash equivalent
--------------		---------------
sleep, getconf		Bash has loadable versions in examples/loadables
${.sh.version}		$BASH_VERSION
print -f		printf
hist			alias fc=hist
$HISTEDIT		$FCEDIT

Section E:  How can I get bash to do certain things, and why does bash do
	    things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?

The specific example used here is [ ! x -o x ], which is false.

Bash's builtin `test' implements the Posix.2 spec, which can be
summarized as follows (the wording is due to David Korn):
   
Here is the set of rules for processing test arguments.
  
    0 Args: False
    1 Arg:  True iff argument is not null.
    2 Args: If first arg is !, True iff second argument is null.
	    If first argument is unary, then true if unary test is true
	    Otherwise error.
    3 Args: If second argument is a binary operator, do binary test of $1 $3
	    If first argument is !, negate two argument test of $2 $3
	    If first argument is `(' and third argument is `)', do the
	    one-argument test of the second argument.
	    Otherwise error.
    4 Args: If first argument is !, negate three argument test of $2 $3 $4.
	    Otherwise unspecified
    5 or more Args: unspecified.  (Historical shells would use their
    current algorithm).
   
The operators -a and -o are considered binary operators for the purpose
of the 3 Arg case.
   
As you can see, the test becomes (not (x or x)), which is false.

E2) Why does bash sometimes say `Broken pipe'?

If a sequence of commands appears in a pipeline, and one of the
reading commands finishes before the writer has finished, the
writer receives a SIGPIPE signal.  Many other shells special-case
SIGPIPE as an exit status in the pipeline and do not report it. 
For example, in:
  
      ps -aux | head
  
`head' can finish before `ps' writes all of its output, and ps
will try to write on a pipe without a reader.  In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE. 

You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.

E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?

Readline, the line editing library that bash uses, does not know
that the terminal escape sequences do not take up space on the
screen.  The redisplay code assumes, unless told otherwise, that
each character in the prompt is a `printable' character that
takes up one character position on the screen. 

You can use the bash prompt expansion facility (see the PROMPTING
section in the manual page) to tell readline that sequences of
characters in the prompt strings take up no screen space. 

Use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence. 

E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?

This has to do with the parent-child relationship between Unix
processes. 

Each element of a pipeline runs in a separate process, a child of
the shell running the pipeline.  A subprocess cannot affect its
parent's environment.  When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell.  When the subshell exits, the value of the variable
is lost. 

Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
a specified command.  The output can then be assigned to a
variable:

	grep ^gnu /usr/lib/news/active | wc -l | read ngroup

can be converted into

	ngroup=$(grep ^gnu /usr/lib/news/active | wc -l)

This does not, unfortunately, work to split the text among
multiple variables, as read does when given multiple variable
arguments.  If you need to do this, you can either use the
command substitution above to read the output into a variable
and chop up the variable using the bash pattern removal
expansion operators or use some variant of the following
approach.

Say /usr/local/bin/ipaddr is the following shell script:

#! /bin/sh
host `hostname` | awk '/address/ {print $NF}'

Instead of using

	/usr/local/bin/ipaddr | read A B C D

to break the local machine's IP address into separate octets, use

	OIFS="$IFS"
	IFS=.
	set -- $(/usr/local/bin/ipaddr)
	IFS="$OIFS"
	A="$1" B="$2" C="$3" D="$4"

Beware, however, that this will change the shell's positional
parameters.  If you need them, you should save them before doing
this.

This is the general approach -- in most cases you will not need to
set $IFS to a different value.

E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?

This is the behavior of echo on most Unix System V machines.

The bash builtin `echo' is modeled after the 9th Edition
Research Unix version of `echo'.  It does not interpret
backslash-escaped characters in its argument strings by default;
it requires the use of the -e option to enable the
interpretation.  The System V echo provides no way to disable the
special characters; the bash echo has a -E option to disable
them. 

There is a configuration option that will make bash behave like
the System V echo and interpret things like `\t' by default.  Run
configure with the --enable-usg-echo-default option to turn this
on.  Be aware that this will cause some of the tests run when you
type `make tests' to fail.

There is a shell option, `xpg_echo', settable with `shopt' that will
change the behavior of echo at runtime.  Enabling this option turns
on expansion of backslash-escape sequences.

E6) Why doesn't a while or for loop get suspended when I type ^Z?

This is a consequence of how job control works on Unix.  The only
thing that can be suspended is the process group.  This is a single
command or pipeline of commands that the shell forks and executes.

When you run a while or for loop, the only thing that the shell forks
and executes are any commands in the while loop test and commands in
the loop bodies.  These, therefore, are the only things that can be
suspended when you type ^Z.

If you want to be able to stop the entire loop, you need to put it
within parentheses, which will force the loop into a subshell that
may be stopped (and subsequently restarted) as a single unit.

E7) What about empty for loops in Makefiles?

It's fairly common to see constructs like this in automatically-generated
Makefiles:

SUBDIRS = @SUBDIRS@

	...

subdirs-clean:
	for d in $SUBDIRS; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done

When SUBDIRS is empty, this results in a command like this being passed to
bash:

	for d in ; do
		( cd $$d && ${MAKE} ${MFLAGS} clean )
	done

This is a syntax error.  If the reserved word `in' is present, a word must
follow it before the semicolon or newline.  The language in the manual page
referring to the list of words being empty refers to the list after it is
expanded.  There must be at least one word following the `in' when the
construct is parsed.

The idiomatic Makefile solution is something like:

SUBDIRS = @SUBDIRS@

subdirs-clean:
	subdirs=$SUBDIRS ; for d in $$subdirs; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done


The POSIX.2 interpretation committee has considered this issue and declared
that the bash implemenation is correct, according to the standard:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-169.html

E8) Why does the arithmetic evaluation code complain about `08'?

The bash arithmetic evaluation code (used for `let', $(()), (()), and in
other places), interprets a leading `0' in numeric constants as denoting
an octal number, and a leading `0x' as denoting hexadecimal.  This is
in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
arithmetic constants should be handled as signed long integers as defined
by the ANSI/ISO C standard.

The POSIX.2 interpretation committee has confirmed this:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?

The problem is `cmdtool' and bash fighting over the input.  When
scrolling is enabled in a cmdtool window, cmdtool puts the tty in
`raw mode' to permit command-line editing using the mouse for
applications that cannot do it themselves.  As a result, bash and
cmdtool each try to read keyboard input immediately, with neither
getting enough of it to be useful.

This mode also causes cmdtool to not implement many of the
terminal functions and control sequences appearing in the
`sun-cmd' termcap entry.  For a more complete explanation, see
that file examples/suncmd.termcap in the bash distribution. 

`xterm' is a better choice, and gets along with bash much more
smoothly.

If you must use cmdtool, you can use the termcap description in
examples/suncmd.termcap.  Set the TERMCAP variable to the terminal
description contained in that file, i.e.

TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:'

Then export TERMCAP and start a new cmdtool window from that shell.
The bash command-line editing should behave better in the new
cmdtool.  If this works, you can put the assignment to TERMCAP
in your bashrc file.

F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?

This is the consequence of building bash on SunOS 5 and linking
with the libraries in /usr/ucblib, but using the definitions
and structures from files in /usr/include. 

The actual conflict is between the dirent structure in
/usr/include/dirent.h and the struct returned by the version of
`readdir' in libucb.a (a 4.3-BSD style `struct direct'). 

Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH
when configuring and building bash.  This will ensure that you
use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you
link with libc before libucb. 

If you have installed the Sun C compiler, you may also need to
put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before
/usr/ucb.

F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?

This is a famous and long-standing bug in the SunOS YP (sorry, NIS)
client library, which is part of libc.

The YP library code keeps static state -- a pointer into the data
returned from the server.  When YP initializes itself (setpwent),
it looks at this pointer and calls free on it if it's non-null. 
So far, so good. 

If one of the YP functions is interrupted during getpwent (the
exact function is interpretwithsave()), and returns NULL, the
pointer is freed without being reset to NULL, and the function
returns.  The next time getpwent is called, it sees that this
pointer is non-null, calls free, and the bash free() blows up
because it's being asked to free freed memory. 

The traditional Unix mallocs allow memory to be freed multiple
times; that's probably why this has never been fixed.  You can
run configure with the `--without-gnu-malloc' option to use
the C library malloc and avoid the problem.

F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?

The `@' character is the default `line kill' character in most
versions of System V, including SVR4.2.  You can change this
character to whatever you want using `stty'.  For example, to
change the line kill character to control-u, type

	stty kill ^U

where the `^' and `U' can be two separate characters.

F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?

The actual command in question is something like

	< file ( command )

According to the grammar given in the POSIX.2 standard, this construct
is, in fact, a syntax error.  Redirections may only precede `simple
commands'.  A subshell construct such as the above is one of the shell's
`compound commands'.  A redirection may only follow a compound command.

This affects the mechanical transformation of commands that use `cat'
to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on
comp.unix.shell).  While most commands of the form

	cat file | command

can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.

The file CWRU/sh-redir-hack in the bash-2.04 distribution is an
(unofficial) patch to parse.y that will modify the grammar to
support this construct.  It will not apply with `patch'; you must
modify parse.y by hand.  Note that if you apply this, you must
recompile with -DREDIRECTION_HACK.  This introduces a large
number of reduce/reduce conflicts into the shell grammar. 

F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

The short answer is that Red Hat screwed up.

The long answer is that they shipped an /etc/inputrc that only works
for emacs mode editing, and then screwed all the vi users by setting
INPUTRC to /etc/inputrc in /etc/profile.

The short fix is to do one of the following: remove or rename
/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile,
but make sure you export it if you do), remove the assignment to
INPUTRC from /etc/profile, add

        set keymap emacs

to the beginning of /etc/inputrc, or bracket the key bindings in
/etc/inputrc with these lines

	$if mode=emacs
		[...]
	$endif

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?

This is a process requiring several steps.

First, you must ensure that the `physical' data path is a full eight
bits.  For xterms, for example, the `vt100' resources `eightBitInput'
and `eightBitOutput' should be set to `true'.

Once you have set up an eight-bit path, you must tell the kernel and
tty driver to leave the eighth bit of characters alone when processing
keyboard input.  Use `stty' to do this:

	stty cs8 -istrip -parenb

For old BSD-style systems, you can use

	stty pass8

You may also need

	stty even odd

Finally, you need to tell readline that you will be inputting and
displaying eight-bit characters.  You use readline variables to do
this.  These variables can be set in your .inputrc or using the bash
`bind' builtin.  Here's an example using `bind':

	bash$ bind 'set convert-meta off'
	bash$ bind 'set meta-flag on'
	bash$ bind 'set output-meta on'

The `set' commands between the single quotes may also be placed
in ~/.inputrc.

G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?

This is why the `command' and `builtin' builtins exist.  The
`command' builtin executes the command supplied as its first
argument, skipping over any function defined with that name.  The
`builtin' builtin executes the builtin command given as its first
argument directly. 

For example, to write a function to replace `cd' that writes the
hostname and current directory to an xterm title bar, use
something like the following:

	cd()
	{
		builtin cd "$@" && xtitle "$HOST: $PWD"
	}

This could also be written using `command' instead of `builtin';
the version above is marginally more efficient. 

G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?

Versions of Bash newer than Bash-2.0 support this directly.  You can use 

	${!var}

For example, the following sequence of commands will echo `z':

	var1=var2
	var2=z
	echo ${!var1}

For sh compatibility, use the `eval' builtin.  The important
thing to remember is that `eval' expands the arguments you give
it again, so you need to quote the parts of the arguments that
you want `eval' to act on. 

For example, this expression prints the value of the last positional
parameter:

	eval echo \"\$\{$#\}\"

The expansion of the quoted portions of this expression will be
deferred until `eval' runs, while the `$#' will be expanded
before `eval' is executed.  In versions of bash later than bash-2.0,

	echo ${!#}

does the same thing.

G4) How can I make the bash `time' reserved word print timing output that
     looks like the output from my system's /usr/bin/time?

The bash command timing code looks for a variable `TIMEFORMAT' and
uses its value as a format string to decide how to display the
timing statistics.

The value of TIMEFORMAT is a string with `%' escapes expanded in a
fashion similar in spirit to printf(3).  The manual page explains
the meanings of the escape sequences in the format string.

If TIMEFORMAT is not set, bash acts as if the following assignment had
been performed:

	TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'

The POSIX.2 default time format (used by `time -p command') is

	TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'

The BSD /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys'

The System V /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S'

The ksh format can be emulated with:

	TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS'

G5) How do I get the current directory into my prompt?

Bash provides a number of backslash-escape sequences which are expanded
when the prompt string (PS1 or PS2) is displayed.  The full list is in
the manual page.

The \w expansion gives the full pathname of the current directory, with
a tilde (`~') substituted for the current value of $HOME.  The \W
expansion gives the basename of the current directory.  To put the full
pathname of the current directory into the path without any tilde
subsitution, use $PWD.  Here are some examples:

	PS1='\w$ '	# current directory with tilde
	PS1='\W$ '	# basename of current directory
	PS1='$PWD$ '	# full pathname of current directory

The single quotes are important in the final example to prevent $PWD from
being expanded when the assignment to PS1 is performed.

G6) How can I rename "*.foo" to "*.bar"?

Use the pattern removal functionality described in D3.  The following `for'
loop will do the trick:

	for f in *.foo; do
		mv $f ${f%foo}bar
	done

G7) How can I translate a filename from uppercase to lowercase?

The script examples/functions/lowercase, originally written by John DuBois,
will do the trick.  The converse is left as an exercise.

G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

You must have set the `extglob' shell option using `shopt -s extglob' to use
this:

	echo .!(.|) *

A solution that works without extended globbing is given in the Unix Shell
FAQ, posted periodically to comp.unix.shell.

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?

Use the `bashbug' script to report bugs.  It is built and
installed at the same time as bash.  It provides a standard
template for reporting a problem and automatically includes
information about your configuration and build environment. 

`bashbug' sends its reports to bug-bash@gnu.org, which
is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug. 

Bug fixes, answers to questions, and announcements of new releases
are all posted to gnu.bash.bug.  Discussions concerning bash features
and problems also take place there.

To reach the bash maintainers directly, send mail to
bash-maintainers@gnu.org.

H2) What kind of bash documentation is there?

First, look in the doc directory in the bash distribution.  It should
contain at least the following files:

bash.1		an extensive, thorough Unix-style manual page
builtins.1	a manual page covering just bash builtin commands
bashref.texi	a reference manual in GNU tex`info format
bashref.info	an info version of the reference manual
FAQ		this file
article.ms	text of an article written for The Linux Journal
readline.3	a man page describing readline

Postscript, HTML, and ASCII files created from the above source are
available in the documentation distribution.

There is additional documentation available for anonymous FTP from host
ftp.cwru.edu in the `pub/bash' directory.

Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates.  The book is based on Bill Rosenblatt's Korn
Shell book.  The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X.  Look for it in fine bookstores near you.  This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.  

A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2.  Look for it in the same fine bookstores
or on the web.

H3) What's coming in future versions?

These are features I plan to include in a future version of bash.

a bash debugger (a minimally-tested version is included with bash-2.04)
associative arrays

H4) What's on the bash `wish list' for future versions?

These are features that may or may not appear in a future version of bash.

breaking some of the shell functionality into embeddable libraries
a module system like zsh's, using dynamic loading like builtins
better internationalization using GNU `gettext'
an option to use external files for the long `help' text
date-stamped command history
a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
	variables (contributions gratefully accepted)

H5) When will the next release appear?

The next version will appear sometime in 2000 or 2001.  Never make
predictions. 


This document is Copyright 1995-2000 by Chester Ramey.

Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
this document for any purpose, provided that the above copyright
notice appears in all copies of this document and that the
contents of this document remain unaltered.


From joinda1@hotmail.com Mon Nov 20 11:09:37 2000
Received: from [211.104.46.232] (helo=hsh)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13xtRM-0000Bt-00
	for <bug-bash@gnu.org>; Mon, 20 Nov 2000 11:05:40 -0500
From: "ÀÌ¿µ¼·." <joinda1@hotmail.com>
To: bug-bash@gnu.org
Subject: ¾È³çÇÏ¼¼¿ä bug-bash@gnu.org´Ô
Mime-Version: 1.0
Content-Type: text/html; charset="iso-2022-kr"
Date: Tue, 21 Nov 2000 00:56:39
Message-Id: <E13xtRM-0000Bt-00@fencepost.gnu.org>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

<html>

<head>
<meta http-equiv="Content-Language" content="ko">
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>¾È³çÇÏ¼¼¿ä</title>
</head>

<body>

<p><b><font size="4">Á¦°Ô ¸ÞÀÏÀ» º¸³»½Ç¶§´Â ²À <A href="mailto:stopbus@hitel.net">stopbus@hitel.net</A>À¸·Î    
º¸³»ÁÖ¼¼¿ä</font></b></p>   
<hr width="70%" align="left" >
   
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px"> ¾È³çÇÏ¼¼¿ä   
bug-bash@gnu.org´Ô...</span></strong></font></p>    
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">¿ì¿¬È÷ http://freedom.sarang.net/prep¿¡ ¹æ¹®Çß´Ù°¡ Á¦      
³ª¸§´ë·Î ÀÌ Á¤º¸°¡ ¼­·Î¿¡°Ô</span></strong></font></p>     
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">µµ¿òÀÌ µÉ¼öÀÖ´Ù°í      
»ý°¢µÇ±â¿¡ ÀÌ·¸°Ô ¸ÞÀÏÀ» µå·Áº¾´Ï´Ù.</span></strong></font></p>     
<p align="left"><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">±âºÐ »óÇÏ¼Ì´Ù¸é      
ÁË¼ÛÇÏ±¸¿ä. ³ÐÀº ¸¶À½À¸·Î ÀÌÇØ ¹Ù¶ø´Ï´Ù.</span></strong></font></p>    
<p align="left"><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">±×¸®°í,     
¿äÁò ³¯¾¾µµ Ãß¿îµ¥ °¨±â Á¶½ÉÇÏ½Ã±¸¿ä</span></strong></font></p>    
<p align="left"><span style="LETTER-SPACING: 0px"><strong><font size="4" face="±¼¸²">°Ç°­     
ÇÏ½Ã°í ÇÏ½Ã´Â ÀÏ Àß µÇ½Ã±æ</font></strong> <strong><font size="4" face="±¼¸²">¹Ù¶ø´Ï´Ù.</font></strong></span></p>    
<p align="left"><strong><font size="4" face="±¼¸²"><span style="LETTER-SPACING: 0px">ÇÏÁö¸¸ ¾Æ·¡ »çÇ×Àº      
ºÐ¸íÇÑ »ç½ÇÀÓÀ» ¾à¼Óµå¸³´Ï´Ù.</span></font></strong></p>     
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">±âÅ¸    
¹®ÀÇ»çÇ×Àº </span></strong></font><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px"><A href="mailto:stopbus@hitel.net">stopbus@hitel.net</A>    
À¸·Î ¸ÞÀÏÀ» ÁÖ½Ã¸é ¾ðÁ¦µç</span></strong></font></p>   
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">ÀÚ¼¼È÷     
¾Ë·Áµå¸®°Ú½À´Ï´Ù.</span></strong></font></p>    
<hr width="70%" align="left"><b><span style="LETTER-SPACING: 0px"><font face="°ß°íµñ" color="#0000ff" size="4">
<P><STRONG><B><SPAN style="LETTER-SPACING: 0px"><FONT color=#0000ff face=°ß°íµñ 
size=4>*Àü±â¿ä±Ý ÀÎ»ó °ÆÁ¤ ¸¶¼¼¿ä</FONT><FONT color=#ff0000 face=°ß°íµñ size=4>-</FONT><FONT 
color=#ff0000 face=°ß°íµñ size=4>Àü±â¸¦ 10~30% Àý¾àÇÒ ¼ö 
ÀÖ½À´Ï´Ù.</FONT></SPAN></B></STRONG></P>
<P><STRONG><B><SPAN style="LETTER-SPACING: 0px"><FONT color=#0000ff face=°ß°íµñ 
size=4>*À¯ÇØ ÀüÀÚÆÄ °ÆÁ¤ÇÏÁö ¸¶¼¼¿ä</FONT><FONT color=#ff0000 face=°ß°íµñ size=4>-ÀüÀÚÆÄ¸¦ Â÷´Ü½ÃÅ³ ¼ö 
ÀÖ½À´Ï´Ù.</FONT></SPAN></B></STRONG></P>
<P>      
 </font></span></b><B><SPAN style="LETTER-SPACING: 0px"><FONT color=#0000ff 
face=°ß°íµñ size=4>*ÀúÈñ Á¦Ç°¿¡ °ü½ÉÀÌ ÀÖÀ¸½ÅºÐÀº ´©±¸¶óµµ È¯¿µÇÕ´Ï´Ù [°³ÀÎµô·¯ È¯¿µ]</FONT></SPAN></B></P>   
<p><font color="#ff0000" size="6" face="°ß°íµñ"><b><span style="LETTER-SPACING: 0px">100% È¯ºÒ ¹× ±³È¯À»      
ÇØ µå¸³´Ï´Ù.</span></b></font></p>    
<p><font face="°ß°íµñ" color="#0000ff" size="4"><b><span style="LETTER-SPACING: 0px"><span style="LETTER-SPACING: 0px">Àü±¹ ¾îµð³ª Á÷Á¢      
¹è´Þ ¼³Ä¡¸¦ ÇØµå¸³´Ï´Ù.(´Ü Áö¹æÀº 5°³ÀÌ»ó)</span></span></b></font></p><b><span style="LETTER-SPACING: 0px"><font face="½Å±×·¡ÇÈ" size="5" color="#ff0066">
<P><FONT color=#0000ff size=4>°£´ÜÈ÷ Àü±â¼ÒÄÏ¿¡ ²È¾Æ¸¸ ÁÖ½Ã¸é µË´Ï´Ù</FONT></P>     
      </font></span></b>
<P><B><SPAN style="LETTER-SPACING: 0px"><FONT color=#ff0066 face=½Å±×·¡ÇÈ size=5>*°¡°Ý 
: °¡Á¤¿ë 55000¿ø , ¾÷¼Ò¿ë : 99000¿ø</FONT><font face="½Å±×·¡ÇÈ" size="4">¡¡</font></SPAN></B></P>    
<p><strong><b><span style="LETTER-SPACING: 0px"><font face="°ß°íµñ" size="4" color="#0000ff">      
 </font></span></b></strong>&nbsp;</p>
<P><FONT face=±¼¸² size=4><STRONG><SPAN style="LETTER-SPACING: 0px">±× ¿Ü¿¡  
<FONT color=#ff0000>´Ù¾çÇÑ ±â´ÉÀÌ </FONT>ÀÖÁö¸¸ ÀÌÁ¤µµ¸¸ 
ÇÏ°Ú½À´Ï´Ù.</SPAN></STRONG></FONT></P>     
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">ÀÚ¼¼ÇÑ »çÇ×Àº&nbsp; 
¾Æ·¡ »çÀÌÆ®¿¡¼­ Á÷Á¢ ´«À¸·Î È®ÀÎÇØ º¸¼¼¿ä</span></strong></font></p>     
<p><font size="4" face="±¼¸²"><span style="LETTER-SPACING: 0px"><strong>¶ÇÇÑ <font color="#0000ff">°Ë»ö¾î</font>¸¦ "<font color="#ff0000"></strong><b>½´ÆÛ¿¡³ÊÁö</b><strong>"</strong></font><strong>¶ó°í      
Ä¡½Ã¸é ¸¹Àº Á¤º¸¸¦ Ã£À¸½Ç ¼ö ÀÖÀ¸¸ç</strong></SPAN></FONT></p>     
<p><font size="4" face="±¼¸²"><strong><span style="LETTER-SPACING: 0px">°¢Á¾ <font color="#ff0000">ÀÏ°£Áö      
¹× KBS 9½Ã ´º½º</font>¿¡ ¹æ¿µ µÇ¾ú½À´Ï´Ù.</span></strong></font></p>     
<p></p>    
<p><a href="http://203.248.251.56/asx.cgi?title=KBS´º½º&amp;url=2000$05$24$230"><span style="LETTER-SPACING: 0px"><b><font size="4">µ¿¿µ»óº¸±â</font></b></span></a>     
 <font size="4"><b><span style="LETTER-SPACING: 0px"><font face="°ß°íµñ" color="#0000ff">[KBS 9½Ã ´º½º]</font>&nbsp; °ü·Ã     
»çÀÌÆ® : <a href="http://www.spenergy.com/">http://www.spenergy.com/</a> ¿Ü     
´Ù¼ö</span></b></font></p>    
<p><font face="°ß°íµñ" size="3"><strong><span style="LETTER-SPACING: 0px">       
</span></strong></font>&nbsp;</p>    
<p><font face="°ß°íµñ" size="3"><strong><span style="LETTER-SPACING: 0px">»ó´ã¹× 
¹®ÀÇÃ³ :&nbsp;½´ÆÛ¿¡³ÊÁö ÀÎÅÍ³Ý »ç¾÷ºÎ&nbsp;&nbsp;&nbsp;&nbsp;</p></SPAN></STRONG></FONT>     
<p><strong><font face="±¼¸²"><span style="LETTER-SPACING: 0px">02-744-0209 . 016-218-2203&nbsp; <FONT color=#0000ff  
size=4>Çù·Â¾÷Ã¼ ¸ðÁýÁß(°³ÀÎµµ °¡´É)</FONT>  </span></font></strong></p>
<P><FONT face=±¼¸²><STRONG>ÇöÀç ÀüÈ­·®ÀÌ ¸¹¾Æ ÅëÈ­°¡ ¾ÊµÉ¶§´Â À½¼º¸Þ¼¼Áö·Î ¿¬¶ôÃ³¸¦ 
³²°ÜÁÖ½Ã°Å³ª</STRONG></FONT></P>
<P><FONT face=±¼¸²><STRONG>¸ÞÀÏ·Î ¿¬¶ôÃ³¸¦ ¾Ë·ÁÁÖ½Ã¸é ¹Ù·Î ¿¬¶ôÀ» µå¸®°Ú½À´Ï´Ù.</STRONG></FONT></P>     
<p><strong><font face="±¼¸²"><span style="LETTER-SPACING: 0px"><FONT color=#0000ff size=4>&nbsp;&nbsp; </FONT> <A href="mailto:stopbus@hitel.net">stopbus@hitel.net</A></span></font></strong></p>     
<p>&nbsp;</p>    
    
</body>    
    
</html>    


From chet@nike.ins.cwru.edu Mon Nov 20 11:43:24 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xu2N-0001Lx-00
	for <bug-bash@gnu.org>; Mon, 20 Nov 2000 11:43:23 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id LAA37138; Mon, 20 Nov 2000 11:43:16 -0500 (EST) (from chet)
Date: Mon, 20 Nov 2000 11:36:33 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: Wolfgang.Oertl@uibk.ac.at
Subject: Re: PATCH: make_var_array() mishandles exportstr on CYGWIN and SuSE
Cc: bug-bash@gnu.org, andreas.schwab@suse.de, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001120163633.AA37124.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from Wolfgang.Oertl@uibk.ac.at of Sat, 18 Nov 2000 11:06:19 +0100 (id <Pine.SGI.4.10.10011181105550.6531151-100000@dm.uibk.ac.at>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> Machine Type: i386-suse-linux
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	In the vanilla version this problem only arises on __CYGWIN__ and
> 	__CYGWIN32__ platforms.  The Bash distributed with SuSE 7.0 contains a
> 	patch that triggers this problem by enabling the __CYGWIN__ code in
> 	this function.

Bad move by Andreas.  He doesn't make many.

> 	During generation of 'export_env', function variables that have their
> 	'exportstr' set, lose.  The problem is localized to the function
> 	variables.c:make_var_array().

Thanks for the analysis, but it's slightly incorrect.  The exportstr member
of a struct variable is primarily used to cache variables in the shell's
initial environment, most of which the user doesn't change.  Using it to
cache exported functions is secondary.  That's why your `quick fix' wouldn't
work.

The proper fix is to simply call INVALIDATE_EXPORTSTR before any checks of
var->exportstr on cygwin systems.  The next release of bash will not have
the call to valid_exportstr().

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Mon Nov 20 11:44:04 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xu32-0001Mc-00
	for <bug-bash@gnu.org>; Mon, 20 Nov 2000 11:44:04 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id LAA37145; Mon, 20 Nov 2000 11:43:59 -0500 (EST) (from chet)
Date: Mon, 20 Nov 2000 11:43:34 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: jedi@hotmail.com
Subject: Re: Setting a command line parameter; $1="new Value"
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001120164334.AA37143.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from jedi@hotmail.com of Sat, 18 Nov 2000 13:05:38 -0600 (id <3a16d322$0$78552$272ea4a1@news.execpc.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I passed in a command line, but i want to set it to a new value... How can I
> do this? The reason why I want to do this is that I might get $1 = My long
> phrase
> 
> But I want to turn $1 = "My long phrase"

Look at the `set' builtin.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From news@cscnews.csc.calpoly.edu Wed Nov 22 13:05:10 2000
Received: from itsnews.csc.calpoly.edu ([129.65.60.45] helo=cscnews.csc.calpoly.edu)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13yeGc-0002SQ-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Wed, 22 Nov 2000 13:05:10 -0500
Received: by cscnews.csc.calpoly.edu (8.9.3/8.9.3) id KAA16625;
	Wed, 22 Nov 2000 10:24:37 -0800 (PST)
To: gnu-bash-bug@prep.ai.mit.edu
Path: monet.artisan.calpoly.edu!cmcollin
From: cmcollin@monet.artisan.calpoly.edu (Christopher Michael Collins ())
Newsgroups: gnu.bash.bug
Subject: Re: Solaris 7 exec bash
Date: 22 Nov 2000 18:24:36 GMT
Organization: Cal Poly State University, San Luis Obispo
Lines: 20
Message-ID: <8vh314$g7d$1@cscnews.csc.calpoly.edu>
References: <8ve1h8$ha1$1@nnrp1.deja.com>
NNTP-Posting-Host: monet.artisan.calpoly.edu
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

In article <8ve1h8$ha1$1@nnrp1.deja.com>,  <jroma@my-deja.com> wrote:

>For the CDE login, I just get dumped back to the
>login screen.  My .dt/startlog and session logs
>seem to show that bash is indeed getting a ^D.
>I've also tried exec'ing /bin/sh and /bin/csh
>from .profile and they do the same thing.

I have the same behavior in solaris 2.5.1 on
a Sun Ultra 5.

Editing my .profile with

exec /usr/bin/bash

Cause me to get dumped back to the CDE login screen.

Please post any solutions you may find.

--Chris


From chet@nike.ins.cwru.edu Mon Nov 20 13:01:05 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13xvFY-0003RU-00
	for <bug-bash@gnu.org>; Mon, 20 Nov 2000 13:01:05 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id NAA37811; Mon, 20 Nov 2000 13:00:55 -0500 (EST) (from chet)
Date: Mon, 20 Nov 2000 13:00:33 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: bug-bash@gnu.org
Subject: Change coming in bash-2.05
Cc: chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001120180033.AA37807.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Bash-2.05 will revert to the bash-2.03 behavior of honoring the current
locale setting when processing ranges within pattern matching bracket
expressions ([A-Z]).  This is what POSIX.2 and SUSv2 specify.

The behavior of the matcher in bash-2.05 depends on the current LC_COLLATE
setting.  Setting this variable to `C' or `POSIX' will result in the
traditional behavior ([A-Z] matches all uppercase ASCII characters).
Many other locales, including the en_US locale (the default on many US
versions of Linux) collate the upper and lower case letters like this:

	AaBb...Zz

which means that [A-Z] matches every letter except `z'.

The portable way to specify upper case letters is [:upper:] instead of
A-Z; lower case may be specified as [:lower:] instead of a-z.

Look at the manual pages for setlocale(3), strcoll(3), and, if it is
present, locale(1).

If you have locale(1), you can use it to find your current locale
information even if you do not have any of the LC_ variables set:

        caleb.ins.cwru.edu(2)$ locale
        LANG=en_US
        LC_CTYPE="en_US"
        LC_NUMERIC="en_US"
        LC_TIME="en_US"
        LC_COLLATE="en_US"
        LC_MONETARY="en_US"
        LC_MESSAGES="en_US"
        LC_ALL=en_US

My advice is to put

	export LC_COLLATE=C

into /etc/profile and inspect any shell scripts run from cron for constructs
like [A-Z].  This will prevent things like

	rm [A-Z]

from removing every file in the current directory except those beginning
with `z' and still allow individual users to change the collation order.
Users may put the above command into their own profiles as well, of course.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From hans_meine@gmx.net Tue Nov 21 06:57:39 2000
Received: from pop.gmx.net ([194.221.183.20] helo=mail.gmx.net)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13yC3P-00058p-00
	for <bug-bash@gnu.org>; Tue, 21 Nov 2000 06:57:39 -0500
Received: (qmail 8927 invoked by uid 0); 21 Nov 2000 11:57:37 -0000
Received: from hmbg-3e36c330.pool.mediaways.net (HELO TuxParadise) (62.54.195.48)
  by mail.gmx.net (mail08) with SMTP; 21 Nov 2000 11:57:37 -0000
Received: from hans by TuxParadise with local (Exim 3.14 #1)
	id 13y0pp-0000vy-00
	for bug-bash@gnu.org; Tue, 21 Nov 2000 00:58:53 +0100
To: bug-bash@gnu.org
Subject: Configurable completion and complete -P (prefix)
From: Hans Meine <hans_meine@gmx.net>
Date: 21 Nov 2000 00:58:52 +0100
Message-ID: <m3itpi8abn.fsf@TuxParadise.local>
Lines: 29
User-Agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/21.1 (Capitol Reef)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Hi!

I just tried read about the complete command in the bash-manpage and tried

  complete -A signal -P '-' kill

hoping that I could do:

  kill -SIG<tab>

However, bash currently uses the prefix only if I do

  kill SIG<tab>

ending up in

  kill -SIG<tab>

which in turn gives me no completions. :-( Thinking about this, is the -P
prefix thingy useful like this in other cases? I can't imagine one right now?
Never mind if this behaviour is intended, I am just curious if I can use
it like that in the future. ;-)

Bye,
   /  /
  /--/
 /  / ANS

/me continues exploring the manpage.. ;-)


From root@library1.airnews.net Tue Nov 21 07:40:19 2000
Received: from library1-aux.airnews.net ([204.181.96.50] helo=library1.airnews.net)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13yCig-0006L8-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Tue, 21 Nov 2000 07:40:18 -0500
Received: by library1.airnews.net id GAA0000014522; Tue, 21 Nov 2000 06:38:32 -0600 (CST)
To: gnu-bash-bug@prep.ai.mit.edu
Path: kodis
From: kodis@jagunet.com (John Kodis)
Newsgroups: gnu.bash.bug
Subject: Re: Change coming in bash-2.05
Date: 21 Nov 2000 12:38:31 GMT
Organization: Jagunet Access Services (using Airnews.net!)
Lines: 11
Message-ID: <slrn91jiav.3fa.kodis@papa.jagunet.com>
References: <1001120180033.AA37807.SM@nike.ins.cwru.edu>
Abuse-Reports-To: abuse at jagunet.com to report improper postings
NNTP-Posting-Host: !]W7h1k-XIos.:# (Encoded at Airnews!)
User-Agent: slrn/0.9.6.2 (Linux)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Previously, Chet Ramey wrote:
> Bash-2.05 will revert to the bash-2.03 behavior of honoring the current
> locale setting when processing ranges within pattern matching bracket
> expressions ([A-Z]).  This is what POSIX.2 and SUSv2 specify.

Isn't this the type of "feature" that the POSIXLY_CORRECT environment
variable was designed to work around?  Is there any chance of making
this a POSIXLY_CORRECT feature?

-- John Kodis.



From news@dejanews.com Tue Nov 21 09:40:47 2000
Received: from mailbox1.ucsd.edu ([132.239.1.53])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13yEbH-0001Fv-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 21 Nov 2000 09:40:47 -0500
Received: from mail.deja.com (mail.deja.com [64.57.170.34])
	by mailbox1.ucsd.edu (8.11.0/8.11.0) with ESMTP id eALEejT00584
	for <gnu-bash-bug@moderators.isc.org>; Tue, 21 Nov 2000 06:40:45 -0800 (PST)
Received: from nnrp1.deja.com (nnrp1.deja.com [10.12.2.16])
	by mail.deja.com (8.8.7/8.8.5) with ESMTP id IAA07682
	for <gnu-bash-bug@moderators.isc.org>; Tue, 21 Nov 2000 08:40:44 -0600
Received: (news@localhost) by nnrp1.deja.com (8.7.6/8.6.12) id IAA17731; Tue, 21 Nov 2000 08:40:41 -0600
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: jroma@my-deja.com
Newsgroups: gnu.bash.bug
Subject: Solaris 7 exec bash
Date: Tue, 21 Nov 2000 14:40:42 GMT
Organization: Deja.com - Before you buy.
Lines: 23
Message-ID: <8ve1h8$ha1$1@nnrp1.deja.com>
NNTP-Posting-Host: 166.34.144.175
X-Article-Creation-Date: Fri Nov 17 16:06:05 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
X-Http-Proxy: 1.1 x70.deja.com:80 (Squid/1.1.22) for client 166.34.144.175
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Solaris 7 (on Ultra 5), .dtprofile (dtprofile.src
v1.10): "[Any] shell requested input will receive
an end of file character (Control-D)"

In a telnet session, my "exec ~/bin/bash -login"
in .profile works fine and I get my bash shell.
For the CDE login, I just get dumped back to the
login screen.  My .dt/startlog and session logs
seem to show that bash is indeed getting a ^D.
I've also tried exec'ing /bin/sh and /bin/csh
from .profile and they do the same thing.

On an E450 runing SunOS 5.5 the "exec ~/bash"
from .profile works fine for both telnet and CDE
sessions.

Is this known behavior for Solaris 7? (also seems
to be that way for SunOS 5.6) Is this workstation
in need of some fixed (DT) configuration?


Sent via Deja.com http://www.deja.com/
Before you buy.


From chet@nike.ins.cwru.edu Tue Nov 21 10:15:54 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13yF9F-0002BY-00
	for <bug-bash@gnu.org>; Tue, 21 Nov 2000 10:15:53 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA54191; Tue, 21 Nov 2000 10:15:48 -0500 (EST) (from chet)
Date: Tue, 21 Nov 2000 10:14:56 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: hans_meine@gmx.net
Subject: Re: Configurable completion and complete -P (prefix)
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001121151456.AA54186.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from hans_meine@gmx.net of 21 Nov 2000 00:58:52 +0100 (id <m3itpi8abn.fsf@TuxParadise.local>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I just tried read about the complete command in the bash-manpage and tried
> 
>   complete -A signal -P '-' kill
> 
> hoping that I could do:
> 
>   kill -SIG<tab>
> 
> However, bash currently uses the prefix only if I do
> 
>   kill SIG<tab>
> 
> ending up in
> 
>   kill -SIG<tab>
> 
> which in turn gives me no completions. :-( Thinking about this, is the -P
> prefix thingy useful like this in other cases? I can't imagine one right now?
> Never mind if this behaviour is intended, I am just curious if I can use
> it like that in the future. ;-)

Any prefix specified with -P is added to each member of the list of possible
completions after that list is generated.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From mike@tecc.co.uk Wed Nov 22 10:13:46 2000
Received: from luggage.tecc.co.uk ([193.128.6.129] helo=relay.tecc.co.uk)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13ybaj-000574-00
	for <bug-bash@prep.ai.mit.edu>; Wed, 22 Nov 2000 10:13:45 -0500
Received: from fw-smtp.tecc.co.uk [195.217.37.39] 
	by relay.tecc.co.uk with esmtp (Exim 1.70 #1)
	id 13ybag-0000tP-00; Wed, 22 Nov 2000 15:13:42 +0000
Received: from handbag.tecc.co.uk ([195.217.37.39] ident=mike)
	by fw-smtp.tecc.co.uk with esmtp (Exim 2.12 #3)
	id 13ybZc-0001yT-00
	for bug-bash@prep.ai.MIT.Edu; Wed, 22 Nov 2000 15:12:36 +0000
From: Mike Taylor <mike@tecc.co.uk>
To: bug-bash@prep.ai.MIT.Edu
Subject: Case-Insensitive Globbing
Message-Id: <E13ybZc-0001yT-00@fw-smtp.tecc.co.uk>
Date: Wed, 22 Nov 2000 15:12:36 +0000
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Dear BashMeisters,

A suggestion: in these days when we all have a lot of files with names
like "04. Fade to Black.mp3" and "04. Fade To Black.mp3" and indeed
"04. FADE TO BLACK.MP3", it would be nice if Bash included a way to
make a globbing-pattern match case-insensitively, so I can say (for
example):

	$ ls *to*\i

Instead of:

	$ ls *[Tt][Oo]*

(The latter isn't too bad with two-letter words, but it would be a bit
of a nightmare to glob for supercalifragilisticexpialidocious in that
way!)

Are there any plans to do something like this?

 _/|_	 _______________________________________________________________
/o ) \/  Mike Taylor -- <mirk@mail.org> -- http://www.miketaylor.org.uk/
)_v__/\  "By filing this bug report you have challenged the honor of my
	 family.  PREPARE TO DIE!" -- Klingon Programming Mantra



From chet@nike.ins.cwru.edu Wed Nov 22 11:19:35 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13yccQ-0007TO-00
	for <bug-bash@gnu.org>; Wed, 22 Nov 2000 11:19:34 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id LAA70276; Wed, 22 Nov 2000 11:19:28 -0500 (EST) (from chet)
Date: Wed, 22 Nov 2000 11:16:27 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: mike@tecc.co.uk
Subject: Re: Case-Insensitive Globbing
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001122161627.AA70269.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from mike@tecc.co.uk of Wed, 22 Nov 2000 15:12:36 +0000 (id <E13ybZc-0001yT-00@fw-smtp.tecc.co.uk>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> A suggestion: in these days when we all have a lot of files with names
> like "04. Fade to Black.mp3" and "04. Fade To Black.mp3" and indeed
> "04. FADE TO BLACK.MP3", it would be nice if Bash included a way to
> make a globbing-pattern match case-insensitively, so I can say (for
> example):

What's wrong with `shopt -s nocaseglob'?

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From rick@gamehaus.net Wed Nov 22 19:45:32 2000
Received: from adsl-63-197-175-153.dsl.lsan03.pacbell.net ([63.197.175.153] helo=gamehaus.net)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13ykW3-0004Jq-00
	for <bug-bash@gnu.org>; Wed, 22 Nov 2000 19:45:31 -0500
Received: from rick by gamehaus.net with local (Exim 3.16 #1)
	id 13ykRk-000Ef5-00
	for bug-bash@gnu.org; Wed, 22 Nov 2000 16:41:04 -0800
To: bug-bash@gnu.org
Subject: [50 character or so descriptive subject here (for reference)]
From: Rick Oliver <rick@gamehaus.net>
Message-Id: <E13ykRk-000Ef5-00@gamehaus.net>
Date: Wed, 22 Nov 2000 16:41:04 -0800
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: freebsd4.1
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd4.1' -DCONF_MACHTYPE='i386--freebsd4.1' -DCONF_VENDOR='' -DSHELL  -DHAVE_CONFIG_H   -I. -I/usr/local/include -I. -I./include -I./lib -I/usr/local/include -O -pipe
uname output: FreeBSD gamehaus.net 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Mon Sep  4 16:46:31 PDT 2000     root@gamehaus.net:/usr/src/sys/compile/MYKERNEL  i386
Machine Type: i386--freebsd4.1

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
What?

Repeat-By:
	[Describe the sequence of events that causes the problem
	to occur.]

Fix:
	[Description of how to fix the problem.  If you don't know a
	fix for the problem, don't include this section.]


From ennis@linux-server.storystreet.com Thu Nov 23 02:37:37 2000
Received: from relay2.shore.net ([207.244.125.21])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13yqwr-0000vg-00
	for <bug-bash@prep.ai.mit.edu>; Thu, 23 Nov 2000 02:37:37 -0500
Received: from linux-server.storystreet.com [209.192.132.10] 
	by relay2.shore.net with esmtp (Exim)
	for bug-bash@prep.ai.mit.edu
	id 13yqxF-0005Tn-00; Thu, 23 Nov 2000 02:38:01 -0500
Received: from ennis by linux-server.storystreet.com with local (Exim 3.16 #1)
	id 13yqwK-0004fR-00
	for bug-bash@prep.ai.mit.edu; Thu, 23 Nov 2000 02:37:04 -0500
Message-Id: <E13yqwK-0004fR-00@linux-server.storystreet.com>
From: Rick Ennis <ennis@linux-server.storystreet.com>
To: bug-bash@prep.ai.mit.edu
Date: Thu, 23 Nov 2000 02:37:04 -0500
Subject: (no subject)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>


From mthomas@gil.com.au Thu Nov 23 07:03:10 2000
Received: from mail.gil.com.au ([203.1.72.90] helo=rex.bne.gil.com.au)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13yv5o-0006gs-00
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 07:03:09 -0500
Received: from snowpea (202-47-51-17.dialup.gil.com.au [202.47.51.17])
	by rex.bne.gil.com.au (8.9.3/8.9.3) with SMTP id WAA57732
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 22:03:01 +1000 (EST)
Message-ID: <000501c05546$ee6f09e0$11332fca@snowpea>
From: "Mike Thomas" <mthomas@gil.com.au>
To: <bug-bash@gnu.org>
Subject: Shell script not found
Date: Thu, 23 Nov 2000 22:14:26 +1000
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

From: mthomas@gil.com.au
To: bug-bash@gnu.org
Subject: Shell script not found

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation
CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' 
-DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H 
  -I.  -I../src -I../src/include -I../src/lib -I/usr/include -g -O2
uname output: CYGWIN_98-4.10 SNOWPEA 1.1.5(0.30/3/2) 2000-11-11 01:49 i586
unknown
Machine Type: i686-pc-cygwin

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
 This problem came up while making the GRASS GIS under cygwin on Win98 at
the
        bottom of a complicated series of make driven shell scripts.

 Basically a shell script can't see the script it wants to execute even
though it exists.

Repeat-By:
 However, it can be brought down to the following script:

 ls -al ./gmake5.0
 ./gmake5.0

 Make a file called mk containing the above two lines which in turn
 check for the existence of the file and then execute it.

        Make an arbitrary file called gmake5.0.

 Execute mk.

 Example output:

 $ ./mk
 -rw-r--r--   1 mike     unknown        79 Nov 22 19:33 ./gmake5.0
 ./gmake5.0: not found

 ls can see the file, but the shell can't!

 chmod doesn't work either:

 $ chmod +rwx ./gmake5.0

 $ ls -al ./gmake5.0
 -rw-r--r--   1 mike     unknown        79 Nov 22 19:33 ./gmake5.0





From klausf@pool.informatik.rwth-aachen.de Thu Nov 23 09:03:53 2000
Received: from nets5.rz.rwth-aachen.de ([137.226.144.13])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13ywye-0001zu-00
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 09:03:53 -0500
Received: from campino.informatik.rwth-aachen.de (campino.Informatik.RWTH-Aachen.DE [137.226.116.240])
	by nets5.rz.rwth-aachen.de (8.10.1/8.10.1/5) with ESMTP id eANE3om07356
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 15:03:50 +0100 (MET)
Received: from matlock.informatik.rwth-aachen.de (klausf@matlock.Informatik.RWTH-Aachen.DE [137.226.116.78])
	by campino.informatik.rwth-aachen.de (8.9.1a/8.9.1/3) with ESMTP id PAA09011
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 15:03:49 +0100 (MET)
From: klausf@Pool.Informatik.RWTH-Aachen.DE
Received: (from klausf@localhost)
	by matlock.informatik.rwth-aachen.de (8.9.1a/8.9.1/1) id PAA23332
	for bug-bash@gnu.org; Thu, 23 Nov 2000 15:03:48 +0100 (MET)
Date: Thu, 23 Nov 2000 15:03:48 +0100 (MET)
Message-Id: <200011231403.PAA23332@matlock.informatik.rwth-aachen.de>
To: bug-bash@gnu.org
Subject: nested exec<<HERE ambiguity
Summary: Where is it specified?
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5.1
Compiler: /opt/local/bin/gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DHOSTTYPE='sparc' -DOSTYPE='solaris2.5.1' -DMACHTYPE='sparc-sun-solaris2.5.1' -DSHELL -DHAVE_CONFIG_H -DSunOS5  -I. -I. -I./lib -g -O2
uname output: SunOS matlock 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-1
Machine Type: sparc-sun-solaris2.5.1

Bash Version: 2.02
Patch Level: 0
Release Status: release

Description:
	When bash sources (`.') the file whose contents is given after the
	"Repeat-By:" line, it doesn't echo a `1' like the bourne and korn
	shells do. I'm not sure which output is correct. If the file is
	used as a shell script, there's no visible difference.

Repeat-By:
exec<<a
exec<<b
echo 2
b
echo 1
a
echo 0


From olk@olk.co.kr Thu Nov 23 13:01:40 2000
Received: from [211.49.129.168] (helo=smtp7.thrunet.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13z0gl-00020b-00
	for <bug-bash@gnu.org>; Thu, 23 Nov 2000 13:01:40 -0500
Received: from thrunet ([210.205.197.216]) by smtp7.thrunet.com  with Microsoft SMTPSVC(5.5.1877.197.19);
	 Fri, 24 Nov 2000 02:59:40 +0900
Date: Fri, 24 Nov 2000 03:01:42 +0900
From: "Online Korea"<olk@olk.co.kr>
To: bug-bash@gnu.org
Subject: bug-bash´Ô ¾È³çÇÏ¼¼¿ä? 
X-AD2000-Serial: 1033
X-AD2000-Register: "¹ÚÀçÇö" <olk@olk.co.kr>
MIME-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: base64
Message-ID: <040e340591717b0SMTP7@smtp7.thrunet.com>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

PEhUTUw+DQo8SEVBRD4NCjxNRVRBIE5BTUU9IkdFTkVSQVRPUiIgQ29udGVudD0iTWljcm9z
b2Z0IERIVE1MIEVkaXRpbmcgQ29udHJvbCI+DQo8VElUTEU+PC9USVRMRT4NCjwvSEVBRD4N
CjxCT0RZPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPqaspqymrKaspqymrKaspqym
rKaspqymrKaspqymrKaspqymrKaspqymrKaspqymrKaspqymrKaspqymrKaspqw8QlI+osQg
v8C0w8DHIMCvuNMgx9G4trXwIA0KosU8L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiy
w7wgc2l6ZT0yPiZuYnNwOyAiRGFkLCBJIGRvbid0IHdhbnQgdG8gZ28gdG8gc2Nob29sIHRv
ZGF5LiwiIHNhaWQgDQp0aGUgYm95LjxCUj4mbmJzcDsgIldoeSBub3QsIHNvbj8iPEJSPiZu
YnNwOyAiV2VsbCwgb25lIG9mIHRoZSBjaGlja2VucyBvbiB0aGUgDQpzY2hvb2wgZmFybSBk
aWVkIGxhc3Qgd2VlayBhbmQgPEJSPiZuYnNwOyZuYnNwOyB3ZSBoYWQgY2hpY2tlbiBzb3Vw
IGZvciBsdW5jaCANCnRoZSBuZXh0IGRheS4gQW5kIHRocmVlIGRheXMgYWdvIDxCUj4mbmJz
cDsmbmJzcDsgb25lIG9mIHRoZSBwaWdzIGRpZWQgYW5kIHdlIA0KaGFkIHJvYXN0IHBvcmsg
dGhlIG5leHQgZGF5LCwsLiI8QlI+Jm5ic3A7ICJCdXQgd2h5IGRvbid0IHlvdSB3YW50IHRv
IGdvIA0KdG9kYXk/IjxCUj4mbmJzcDsgIkJlY2F1c2UgdGhlIEVuZ2xpc2ggdGVhY2hlciBk
aWVkIHllc3RlcmRheSEiPEJSPiZuYnNwOyANCiIuLi4uLiI8L0ZPTlQ+PC9QPg0KPFA+PEZP
TlQgZmFjZT2xvLiyw7wgc2l6ZT0yPiZuYnNwOyAivsa6/Cwgs6ogv8C0wyDH0LGzILChseIg
vci+7i4iIMfPsO0gvNKz4sDMILi7x9+02S48QlI+Jm5ic3A7ICK/1iCwobHiIA0Kvci+7j8i
PEJSPiZuYnNwOyAiwfazrSDB1r+hIMfQsbMgs/PA5b+hvK0gtN8gx9EguLa4rrChIMHXvvq0
wrWlILTZwL2zryDBob3JwLi3ziA8QlI+Jm5ic3A7Jm5ic3A7ILTfIL26x8G4piC41L76vu4u
IA0Ksde4rrDtIDPAzyDA/L+htMIgtcXB9iDH0SC4triusKEgwde++rTCtaUgPEJSPiZuYnNw
OyZuYnNwOyCx1yC02cC9ILOvv6G0wiC1xcH2ILrSsO2x4rimILjUvvqw7S4uLi4iPEJSPiZu
YnNwOyANCiKx17extaUgv8C0w8C6IL/WIMfQsbO/oSCwobHiIL3Ivu4/IjxCUj4mbmJzcDsg
Ir7uwaYgv7W+7iC8sbv9tNTAzCC1ub7GsKG8zLTcILi7vt8hIjxCUj4mbmJzcDsgDQoiLi4u
Li4iPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6ixCC/wLTDwMcg
v7W+7iDH0bi2tfAgosUmbmJzcDsmbmJzcDsmbmJzcDsgPC9GT05UPjwvUD4NCjxQPjxGT05U
IGZhY2U9sby4ssO8IHNpemU9Mj6iwiBJIGZlbHQgb24gdG9wIG9mIHRoZSANCndvcmxkJm5i
c3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5i
c3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7IA0KPC9GT05UPjwvUD4N
CjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6757b3wLogtKmxuLOqILy6sPjHz7jpILHi
utDAzCDBwcC6ILDNwLogtOe/rMfPwfa/5C4gPEJSPrmwt9AsIL7utrIgu+e297XpwLogvLqw
+MffwLsgtqe/oSC09SANCrDivNXH2MH2wfa4uCC067rOutDAxyC757b3tenAuiA8QlI+W7Oq
uKYgusEhILO7sKEgw9aw7b7fXbbzsO0gu/2wosfVtM+02S4gPEJSPsDMv80gsLDAuiCx4rrQ
wLsgs6rFuLO7tMIgx6XH9sDMICdvbiB0b3Agb2YgDQp0aGUgd29ybGQntvi0z7TZLjwvRk9O
VD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+QTogSSBoZWFyZCB5b3Ugd2Vy
ZSBlbmdhZ2VkIHRvIE1hcmlhbi48L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wg
c2l6ZT0yPkI6IEFjdHVhbGx5LCBJIHdhcy48L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2x
vLiyw7wgc2l6ZT0yPkE6IE9oLCByZWFsbHk/IFNvLCBob3cgZGlkIHlvdSBmZWVsIG9uIHRo
ZSBuaWdodCBvZiANCnlvdXIgZW5nYWdlbWVudD88L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFj
ZT2xvLiyw7wgc2l6ZT0yPkI6IEkgZmVsdCBsaWtlIEkgd2FzIG9uIHRvcCBvZiB0aGUgd29y
bGQuPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6h4SdvbiB0b3Ag
b2YgdGhlIHdvcmxkJ7imIMH3v6rHz7jpIFu8vLvzILLAtOux4r+hXbbztMIgwMe5zMDMuOcg
DQo8QlI+Jm5ic3A7ICdJIGZlbHQgb24gdG9wIG9mIHRoZSB3b3JsZC4ntMIgIry8u/MgssC0
67Hiv6EgwNa0wiC0wLOmwMy++rTZLiI8QlI+Jm5ic3A7IMHvLCAosbLA5cj3IA0KseK60MDM
IMHBvtK02Sm4piC25sfVtM+02S48QlI+Jm5ic3A7IMjnyPcgW7HiutDAzCDBwb7Svu5dtvO0
wiDAx7nMt84gJ0kgZmVsdCBnb29kLie4uMC7ILv9sKLHz7HiIL2sv+yzqiANCjxCUj4mbmJz
cDsgwMwgx6XH9rW1IL7LsO0gwNbAuLjpILCowaTAxyDHpcf2wLsgtPUgwN8gx9IgvPYgwNbA
uyCwxb+hv+QuPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6iwSAn
b24gdG9wIG9mIHRoZSB3b3JsZCe0wiC8vLvzILLAtOux4r+hIMDWtMIgtMCzpiEuILHXt7i0
2bjpIA0KPEJSPiZuYnNwOyZuYnNwOyAnb3V0IG9mIHRoaXMgd29ybGQntMI/IMDMILy8u/PA
xyDAzyCwsMH2IL7KsNQgsdm758fRW3dvbmRlcmZ1bF0sIA0KPEJSPiZuYnNwOyZuYnNwOyDI
pMC6IMivu/PA+8DOW2ZhbnRhc3RpY13AzLb1ILbmwMy/ob/kLjwvRk9OVD48L1A+DQo8UD48
Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+QToguN64rr7IsPogvuDIpcfRtNmw7SC16b76tMK1
pS48QlI+Qjogu+e9xyDAzLnMIMffvu4uPEJSPkE6IL7uLCANCsGkuLvAzL7fPyZuYnNwOyCx
17ehLL7gyKW9xMfRILHXs68gueO/oSCx4rrQwMwgvu62rr7uPzxCUj5COiC8vLvzwLsgvvLA
uiCx4rrQwMy++sH2LjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+
osQgv8C0w8DHIMDPvu4mbmJzcDsgx9G4trXwIKLFPC9GT05UPjwvUD4NCjxQPjxGT05UIGZh
Y2U9sby4ssO8IHNpemU9Mj4mbmJzcDsmbmJzcDsgodjAz77utbUgv7W+7r/NILCwwLogx/zF
wrfOILG4vLogtce+7iANCsDWvcC0z7TZLjxCUj4tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS08QlI+YnVnLWJhc2i01CANCr7I
s+fHz7y8v+Q/IDwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+wPrI
8bTCIMD8yK24piDAzL/rx9i8rSCwrbvnv80gMToxt84gv9yxub7uIMfQvcDAuyDH0iC89iDA
1rTCIDxCUj6ixCBPbmxpbmUgS29yZWEgDQpbJm5ic3A7IDxBIGhyZWY9Imh0dHA6Ly93d3cu
b2xrLmNvLmtyIj5odHRwOi8vd3d3Lm9say5jby5rcjwvQT4mbmJzcDsgXSCixSC287DtIA0K
x9W0z7TZLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+uNXA+iwg
x+O29L74wMwgxu3B9iC15bfBIMHLvNvH1bTPtNkuILrOtfAgs8qx17evv+4gv+u8rbimLi4u
Li4uPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj7A+sjxIMi4u+e/
obyttMIgv7W+7iDAr7jTv80gu/3IsCDIuMitv6EgsPy9ySDA1rTCILrQtemysiC4xcDPKL/5
LbHdKSwgPEJSPr+1vu4gwK+407/NIL3HIA0Ku/3IsL+hIMfKv+TH0SC7/ciwyLjIrSDH0SC5
rsDlvr/AuyC5q7fht84gurizuyC15biusO0gwNa+7r/kLjwvRk9OVD48L1A+DQo8UD48Rk9O
VCBmYWNlPbG8uLLDvCBzaXplPTI+wKe/zbCwwLogs7u/68DHILytuvG9urimILnevsa6uLHi
IL/4x8+9w7jpIKHsIDxBIA0KaHJlZj0ibWFpbHRvOm9sa0BvbGsuY28ua3IiPm9sa0BvbGsu
Y28ua3I8L0E+IKHtt84gPEJSPiJ5ZXMitvO0wiCzu7/rwMcgtOTA5cC7IMHWvcOx4iANCrnZ
tvi0z7TZLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+sde4rrDt
LCDA+sjxIMD8yK0gv9yxub7uILCtwMewoSCxw7Hdx8+9xSC60LXpwLsgwKfH2CZuYnNwOyA8
QSANCmhyZWY9Imh0dHA6Ly93d3cub2xrLmNvLmtyL2xlY3R1cmVfZnJhbWUuaHRtIj6iwiC9
w7n8sK3AxyCiwiA8L0E+tbUgPEJSPjHIuL+hIMfRx9i8rSC5q7fht84gDQq9x73Dx8+w7SDA
1sC4tM8gx9G5+CC16b7uuriw7SC9zcC4vcO46SDB9rHdIL3Fw7vH2CDB1ry8v+QuPC9GT05U
PjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj65q7fhIL3DufywrcDHIL3Fw7sg
uea5/cC6IDxBIA0KaHJlZj0iaHR0cDovL3d3dy5vbGsuY28ua3IvbGVjdHVyZV9mcmFtZS5o
dG0iPqK6IL+pseIgorggPC9BPrimIMWsuK/Hz73FIMjEILCtwMcgvcXDu7b1v6EgDQrA1rTC
PEJSPr3DufywrcDHuKYgvcXDu8fPvcO46SDA+sjxsKEgwPzIrbimILXlt8EgvcO5/LCtwMe4
piDH2CC15biwtOS0z7TZLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXpl
PTI+ubC30CwgwPzIrSAwMi01ODgtMDUxMCDAuLfOtbUgvcXDu8fPvccgvPYgwNaxuL/kLjwv
Rk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+vsa5q8LJt88gwMwgx9C9
wLn9wMwgYnVnLWJhc2i01MDHIMi4yK0gvce3wiDH4rvzv6EgwNvAuiC6uMXGwMwgDQq1x776
wLi46TxCUj7H1bTPtNkuPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9
Mj6wqLvnx9W0z7TZLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+
YnVnLWJhc2i01LKytMIgaHR0cDovL2ZyZWVkb20uc2FyYW5nLm5ldC9wcmVwL21haWxpbmds
aXN0cy5odG1sv6EgwNa0wiDB1rzSuKYguriw7SC43sDPILXluK6w1CANCrXHvvq9wLTPtNku
PC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj660sfKv+TH0SDBpLq4
v7S02bjpIMGkuLsgwcu828fVtM+02S48QlI+PC9GT05UPjwvUD4NCjwvQk9EWT4NCjwvSFRN
TD4NCg==




From news@news.idiom.com Thu Nov 23 16:39:59 2000
Received: from news.idiom.com ([216.240.32.12])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13z463-0001S2-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Thu, 23 Nov 2000 16:39:59 -0500
Received: (from news@localhost)
	by news.idiom.com (8.9.3/8.8.5) id NAA84073;
	Thu, 23 Nov 2000 13:39:57 -0800 (PST)
To: gnu-bash-bug@prep.ai.mit.edu
Path: idiom.com!rss
From: "Richard S. Smith" <rss@idiom.com>
Newsgroups: gnu.bash.bug
Subject: YAPCQ (Yet Another Programmable Completion Question)
Date: 23 Nov 2000 21:39:57 GMT
Organization: Idiom Communications
Lines: 23
Message-ID: <8vk2rd$2hol$1@news.idiom.com>
NNTP-Posting-Host: idiom.com
X-Trace: news.idiom.com 975015597 83733 216.240.32.1 (23 Nov 2000 21:39:57 GMT)
X-Complaints-To: abuse@idiom.com
NNTP-Posting-Date: 23 Nov 2000 21:39:57 GMT
User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.5-RELEASE (i386))
User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.5-RELEASE (i386))
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

I'm a ClearCase user, and ClearCase provides many opportunities to do
cool stuff using programmable completion.  When one is in a ClearCase-
controlled filsystem, the filenames are "sticky" and there are special
commands you can use to access a file's entire version history.

Without getting into excessive detail, here is what I want to do.
Let's say I have a function called "clearcase_complete_file" that does
ClearCase-enhanced filename completion.  It's easy enough to bind this
function to specific ClearCase commands, but what if I want to make it
into a generalized function that works in any filename context,
regardless of what command I'm using?

What I want is some way to hook the default readline-based behavior
and have it use my function instead.  The other way to win would be to
bind my special function to a keyboard sequence using .inputrc or some
comparable mechanism.

Any ideas?  Thanks, as always.

-- 
--------------------------------------------------------------------------
 Richard S. Smith / Email: rss@idiom.com / Web: http://www.idiom.com/~rss
--------------------------------------------------------------------------


From 320010282260-0001@t-dialin.net Thu Nov 23 19:54:25 2000
Received: from mailout01.sul.t-online.com ([194.25.134.80])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 13z78C-00089l-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Thu, 23 Nov 2000 19:54:24 -0500
Received: from imh00.aul.t-online.de 
	by mailout01.sul.t-online.com with smtp 
	id 13z78B-0004Oa-00; Fri, 24 Nov 2000 01:54:23 +0100
Received: from news00.aul.t-online.de by imh00.btx.dtag.de 
	with esmtp id 13z78B-00040t-00; Fri, 24 Nov 2000 01:54:23 +0100
Received: from news by news00.aul.t-online.de with local
	id 13z79x-00032v-00; Fri, 24 Nov 2000 01:56:13 +0100
To: gnu-bash-bug@prep.ai.mit.edu
Path: news.t-online.com!not-for-mail
From: Nils Goesche <cartan@t-online.de>
Newsgroups: gnu.bash.bug
Subject: How do I disable MAILCHECK?
Date: 24 Nov 2000 01:55:01 +0100
Organization: T-Online
Lines: 13
Message-ID: <873dgi6vfe.fsf@darkstar.cartan>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.t-online.com 975027372 00 11538 gGXFB0TSWHEAn 001124 00:56:12
X-Complaints-To: abuse@t-online.com
X-Sender: 320010282260-0001@t-dialin.net
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Hi!

I would like to disable the MAILCHECK feature, but no matter
whether I set MAILCHECK to 0 or unset it, I always get these `New
mail for cartan@darkstar has arrived:' lines in all of my open
shells.  I am using

GNU bash, version 2.03.0(1)-release (i386-slackware-linux-gnu)

Any ideas?
-- 
Nils Goesche
Ask not for whom the <CONTROL-G> tolls.


From news@dejanews.com Fri Nov 24 04:40:30 2000
Received: from mailbox2.ucsd.edu ([132.239.1.54])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13zFLJ-0007iE-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 24 Nov 2000 04:40:29 -0500
Received: from mail.deja.com (mail.deja.com [64.57.170.34])
	by mailbox2.ucsd.edu (8.11.0/8.11.0) with ESMTP id eAO9gaR24413
	for <gnu-bash-bug@moderators.isc.org>; Fri, 24 Nov 2000 01:42:36 -0800 (PST)
Received: from nnrp1.deja.com (nnrp1.deja.com [10.12.2.16])
	by mail.deja.com (8.8.7/8.8.5) with ESMTP id DAA19331
	for <gnu-bash-bug@moderators.isc.org>; Fri, 24 Nov 2000 03:40:26 -0600
Received: (news@localhost) by nnrp1.deja.com (8.7.6/8.6.12) id DAA24302; Fri, 24 Nov 2000 03:40:23 -0600
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: scott douglass <scott6459@my-deja.com>
Newsgroups: gnu.bash.bug
Subject: 'shopt -s expand_aliases' problem [resend]
Date: Fri, 24 Nov 2000 09:40:23 GMT
Organization: Deja.com - Before you buy.
Lines: 69
Message-ID: <8vld27$nnd$1@nnrp1.deja.com>
NNTP-Posting-Host: 193.131.176.3
X-Article-Creation-Date: Fri Nov 24 09:40:23 2000 GMT
X-Http-User-Agent: Mozilla/4.72 [en] (Windows NT 5.0; U)
X-Http-Proxy: 1.0 x61.deja.com:80 (Squid/1.1.22) for client 193.131.176.3
X-MyDeja-Info: XMYDJUIDscott6459
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

[The first two attempts at posting this didn't seem to propagate.  My
apologies if you see this twice.]

Hello,

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5.1
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.5.1' -DCONF_MACHTYPE='sparc-sun-solaris2.5.1'
-DCONF_VENDOR='sun' -DSHELL  -DHAVE_CONFIG_H -DSunOS5  -I.  -I.
-I./include -I./lib -I/usr/local/include -g -O2
uname output: SunOS threeofsolaris 5.6 Generic_105181-22 sun4u sparc
SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.5.1

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:

I'm trying to emulate ksh's exported aliases and I'm having a problem
with 'shopt -s expand_aliases':  it doesn't seem to stay on between my
BASH_ENV file and my script.

Repeat-By:

For example, given these two files:

$HOME/my_bash_env:
echo Welcome to my_bash_env
echo This is bash $BASH_VERSION
shopt -s expand_aliases
shopt expand_aliases
echo

./my_script:
#!/usr/local/bin/bash
echo Welcome to my_script
shopt expand_aliases

Then

BASH_ENV=$HOME/my_bash_env ./my_script

Produces this:

Welcome to my_bash_env
This is bash 2.04.0(1)-release
expand_aliases  on

Welcome to my_script
expand_aliases  off

How did expand_aliases get turned off?  Is it a bash bug?

I've looked in bashref.info, the bash FAQ and Deja -- but I didn't find
an answer.

Any aliases I set in my BASH_ENV file are still set but they don't
expand since expand_aliases is off.

Thanks.


Sent via Deja.com http://www.deja.com/
Before you buy.


From news@news2-win.server.ntlworld.com Sat Nov 25 19:43:00 2000
Received: from mailbox1.ucsd.edu ([132.239.1.53])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 13zpuG-00076W-00
	for <bug-bash@prep.ai.mit.edu>; Sat, 25 Nov 2000 19:43:00 -0500
Received: from news2-win.server.ntlworld.com (news2c-win.server.ntlworld.com [62.253.162.104])
	by mailbox1.ucsd.edu (8.11.0/8.11.0) with ESMTP id eAQ0gvv09649
	for <gnu-bash-bug@moderators.isc.org>; Sat, 25 Nov 2000 16:42:58 -0800 (PST)
Received: (from news@localhost)
	by news2-win.server.ntlworld.com (8.8.8+Sun/8.8.8) id AAA08081;
	Sun, 26 Nov 2000 00:42:57 GMT
To: gnu-bash-bug@moderators.isc.org
Path: none444.yet
From: no.email.address.entered@none444.yet
Newsgroups: gnu.bash.bug
Subject: Slag.TV
Message-ID: <26110000.4306@none444.yet>
Organization: <no organization>
Reply-To: britishladzrool@hotmail.com
Lines: 4
Date: Sunday, 26 Nov 2000 00:43:06 -0600
NNTP-Posting-Host: 62.255.181.61
X-Complaints-To: abuse@ntlworld.com
X-Trace: news2-win.server.ntlworld.com 975199376 62.255.181.61 (Sun, 26 Nov 2000 00:42:56 GMT)
NNTP-Posting-Date: Sun, 26 Nov 2000 00:42:56 GMT
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

hacked porn video feed
http://www.sogayuk.com/webxman



From karlheg@bittersweet.inetarena.com Sun Nov 26 23:00:56 2000
Received: from bittersweet.inetarena.com ([209.102.107.172])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 140FTL-00077B-00
	for <bug-bash@gnu.org>; Sun, 26 Nov 2000 23:00:56 -0500
Received: by bittersweet.inetarena.com (Postfix, from userid 1000)
	id AC3CB22B8A6; Sun, 26 Nov 2000 20:00:53 -0800 (PST)
To: bug-bash@gnu.org, bash@packages.debian.org
Subject: [Patch-ID: bash204-007] I think this patch is wrong.
From: karlheg@bittersweet.inetarena.com (Karl M. Hegbloom)
Date: 26 Nov 2000 20:00:52 -0800
Message-ID: <87bsv2dpxn.fsf@bittersweet.intra>
Lines: 47
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I/home/swt/doko/export/packages/bash/bash-2.04 -I/home/swt/doko/export/packages/bash/bash-2.04/include -I/home/swt/doko/export/packages/bash/bash-2.04/lib -I/usr/include -g -O2
uname output: Linux bittersweet 2.4.0-test11 #9 Sat Nov 25 00:42:53 PST 2000 i586 unknown
Machine Type: i386-pc-linux-gnu

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
 This mail is in reference to:

Bash-Release: bash-2.04.0-release
Patch-ID: bash204-007
Bug-Reported-by: jsberg@jsberg1.cap.bnl.gov
Bug-Reference-ID: <200003301604.LAA18064@jsberg1.cap.bnl.gov>

 ... found in the Debian 2.04-9 "bash-2.04/debian/patches/p7.dpatch"
 source package.

 Consider the following example...

 declare -a dirs
 old_IFS="$IFS"
 IFS="$(echo -ne '\000')"
 dirs=($(find . -depth -follow -mindepth 1 -type d -print0 2>/dev/null))
 IFS="$old_IFS"

 ... Note the use of `-print0' in the find command, an attempt at
 preserving spaces in file names, likely common on vfat filesystems;
 perhaps our script is performing maintainence or backups on a machine
 that normally (if you can call that normal) runs Windows while booted
 to Linux temporarily.  (Temporary sanity)

 I had thought, since the info states that command substitution is
 performed before word splitting, that the above snip would yeild an
 array containing the file names, even if some of the file names
 contain oddball characters, such as quote marks, spaces, tabs, or
 even cariage returns and newlines.  This was not the case.  The NUL
 characters are stripped, the file names are run together, and word
 splitting doesn't occur the way I thought it would.

 In order to get what I want, I am forced to explicitly iterate over
 the output of the find command, and assign each array element
 individually.


From root@news5.ptd.net Mon Nov 27 02:05:25 2000
Received: from dfw7-1.relay.mail.uu.net ([199.171.54.106])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 140ILs-00049t-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 27 Nov 2000 02:05:24 -0500
Received: from mail.ptd.net by dfw7sosrv11.alter.net with SMTP 
	(peer crosschecked as: mail1.ha-net.ptd.net [207.44.96.65])
	id QQjrbw21527
	for <gnu-bash-bug@moderators.isc.org>; Mon, 27 Nov 2000 07:05:23 GMT
Received: (qmail 29552 invoked from network); 27 Nov 2000 07:05:50 -0000
Received: from news5a.ha-net.ptd.net ([204.186.200.101]) (envelope-sender <>)
          by mail.ptd.net (qmail-ldap-1.03) with QMQP
          for <>; 27 Nov 2000 07:05:50 -0000
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: yentpx@ttlc.net
Newsgroups: gnu.bash.bug
Subject: Hey All Check this site out !!!!
Lines: 11
Message-ID: <gPnU5.17434$4e.20522@nnrp1.ptd.net>
Date: Mon, 27 Nov 2000 07:12:12 GMT
NNTP-Posting-Host: 24.229.19.147
X-Complaints-To: abuse@ptd.net
X-Trace: nnrp1.ptd.net 975309132 24.229.19.147 (Mon, 27 Nov 2000 02:12:12 EST)
NNTP-Posting-Date: Mon, 27 Nov 2000 02:12:12 EST
Organization: PenTeleData http://www.ptd.net
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

http://www.cashwars.com/r/sike3

begin 644 Cashwar.HTML
M/&$@:')E9CTB:'1T<#HO+W=W=RYC87-H=V%R<RYC;VTO<B]S:6ME,R(^/&EM
M9R!B;W)D97(](C$B('-R8STB:'1T<#HO+W=W=RYC87-H=V%R<RYC;VTO:6UA
M9V5S+V-W;&]G;V)L=64N9VEF(B!W:61T:#TB,3<U(B!H96EG:'0](C0X(CX\
#+V$^
`
end
                                    


From chet@granite.ins.cwru.edu Mon Nov 27 10:00:05 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 140PlD-00051O-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 27 Nov 2000 10:00:03 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA13459; Mon, 27 Nov 2000 10:00:01 -0500 (EST) (from chet)
Message-Id: <200011271500.KAA13459@granite.INS.CWRU.Edu>
Date: Mon, 27 Nov 2000 10:00:01 -0500 (EST)
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@prep.ai.mit.edu
Subject: BASH Frequently-Asked Questions (FAQ version 3.9)
Reply-To: chet@po.cwru.edu
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Thu May 18 13:08:48 EDT 2000
FAQ-Version: 3.9
Bash-Version: 2.04
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)

This is the Bash FAQ, version 3.9, for Bash version 2.04.

This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell.  Bash is a freely-available command
interpreter with advanced features for both interactive use and shell
programming.

Another good source of basic information about shells is the collection
of FAQ articles periodically posted to comp.unix.shell.

Questions and comments concerning this document should be sent to
chet@po.cwru.edu.

This document is available for anonymous FTP with the URL

ftp://ftp.cwru.edu/pub/bash/FAQ

The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html

----------
Contents:

Section A:  The Basics

A1) What is it?
A2) What's the latest version?
A3) Where can I get it?
A4) On what machines will bash run?
A5) Will bash run on operating systems other than Unix?
A6) How can I build bash with gcc?
A7) How can I make bash my login shell?
A8) I just changed my login shell to bash, and now I can't FTP into my
    machine.  Why not?
A9) What's the `POSIX 1003.2 standard'?
A10) What is the bash `posix mode'?

Section B:  The latest version

B1) What's new in version 2.04?
B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?
C2) How does bash differ from the Korn shell, version ksh88?
C3) Which new features in ksh-93 are not in bash, and which are?

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?
D2) Why doesn't bash treat brace expansions exactly like csh?
D3) Why doesn't bash have csh variable modifiers?
D4) How can I make my csh aliases work when I convert to bash?
D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?
D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

Section E:  Why does bash do certain things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?
E2) Why does bash sometimes say `Broken pipe'?
E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?
E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?
E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?
E6) Why doesn't a while or for loop get suspended when I type ^Z?
E7) What about empty for loops in Makefiles?
E8) Why does the arithmetic evaluation code complain about `08'?

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?
F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?
F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?
F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?
F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?
F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?
G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?
G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?
G4) How can I make the bash `time' reserved word print timing output that
    looks like the output from my system's /usr/bin/time?
G5) How do I get the current directory into my prompt?
G6) How can I rename "*.foo" to "*.bar"?
G7) How can I translate a filename from uppercase to lowercase?
G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?
H2) What kind of bash documentation is there?
H3) What's coming in future versions?
H4) What's on the bash `wish list'?
H5) When will the next release appear?

----------
Section A:  The Basics

A1)  What is it?

Bash is a Unix command interpreter (shell).  It is an implementation of
the Posix 1003.2 shell standard, and resembles the Korn and System V
shells.

Bash contains a number of enhancements over those shells, both
for interactive use and shell programming.  Features geared
toward interactive use include command line editing, command
history, job control, aliases, and prompt expansion.  Programming
features include additional variable expansions, shell
arithmetic, and a number of variables and options to control
shell behavior.

Bash was originally written by Brian Fox of the Free Software
Foundation.  The current developer and maintainer is Chet Ramey
of Case Western Reserve University.

A2)  What's the latest version?

The latest version is 2.04, first made available on Friday, 17 March 2000.

A3)  Where can I get it?

Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors.  The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 2.04:

ftp://ftp.gnu.org/pub/gnu/bash/bash-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-2.04.tar.gz

Formatted versions of the documentation are available with the URLs:

ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.04.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-2.04.tar.gz

A4)  On what machines will bash run?

Bash has been ported to nearly every version of UNIX.  All you
should have to do to build it on a machine for which a port
exists is to type `configure' and then `make'.  The build process
will attempt to discover the version of UNIX you have and tailor
itself accordingly, using a script created by GNU autoconf.

More information appears in the file `INSTALL' in the distribution.

A5) Will bash run on operating systems other than Unix?

Configuration specifics for Unix-like systems such as QNX and
LynxOS are included in the distribution.  Bash-2.04 should 
compile and run on Minix 2.0 (patches were contributed), but I
don't believe anyone has built bash-2.x on earlier Minix versions
yet.

Bash has been ported to versions of Windows implementing the Win32
programming interface.  This includes Windows 95 and Windows NT.
The port was done by Cygnus Solutions as part of their CYGWIN
project.  For more information about the project, look at the URL

http:/sourceware.cygnus.com/cygwin

Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases.  Cygnus has also done a
port of bash-2.02.1 to the CYGWIN environment, and it is available as
part of their current release.  (They may have upgraded by now.)

Bash-2.04 should require no local Cygnus changes to build and run under
CYGWIN.

The Cygnus port works only on Intel machines.  There is a port of bash
(I don't know which version) to the alpha/NT environment available from

ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz

Softway Systems has ported bash-2.01 to their Interix (nee OpenNT)
system, a Unix subsystem for NT that replaces the Microsoft POSIX
subsystem.  Check out http://www.interix.com for more information.
Some support for Interix has been incorporated into bash, beginning
with Bash-2.03.  It should be easier to build bash on Interix now,
but Interix users should fetch

ftp://ftp.interix.com/pub/tw/unsup/bash.diffs.tar.gz

and read the README.OpenNT file in that archive.  It will detail the
arguments `configure' needs to build on Interix.  A configure cache
file for Interix is in the bash distribution in cross-build/opennt.cache;
copy that to `config.cache' before starting configure.

DJ Delorie has a port of bash-1.14.7 which runs under MS-DOS, as part
of the DJGPP project.  For more information on the project, see

http://www.delorie.com/djgpp/

I have been told that the original DJGPP port was done by Daisuke Aoyama.

I picked up a binary of bash-1.14.7 that is purported to work with
the DJGPP V2 environment from

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147b.zip

The corresponding source is

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh1147s.zip

Mark Elbrecht <snowball3@bigfoot.com> has sent me notice that bash-2.03
has become available for DJGPP V2.  The files are available as:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203b.zip	binary
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203d.zip	documentation
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh203s.zip	source

Mark has begun to work with bash-2.04.

Ports of bash-1.12 and bash-2.0 are available for OS/2 from

ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash_112.zip
ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash-2.0(253).zip

I haven't looked at either, but the second appears to be a binary-only
distribution.  Beware.

I have received word that Bash (I'm not sure which version, but I
believe that it's at least bash-2.02.1) is the standard shell on
BeOS.

A6) How can I build bash with gcc? 

Bash configures to use gcc by default if it is available.  Read the
file INSTALL in the distribution for more information.

A7)  How can I make bash my login shell?

Some machines let you use `chsh' to change your login shell.  Other
systems use `passwd -s' or `passwd -e'.  If one of these works for
you, that's all you need.  Note that many systems require the full
pathname to a shell to appear in /etc/shells before you can make it
your login shell.  For this, you may need the assistance of your
friendly local system administrator. 

If you cannot do this, you can still use bash as your login shell, but
you need to perform some tricks.  The basic idea is to add a command
to your login shell's startup file to replace your login shell with
bash.

For example, if your login shell is csh or tcsh, and you have installed
bash in /usr/gnu/bin/bash, add the following line to ~/.login:

	if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login

(the `--login' tells bash that it is a login shell).

It's not a good idea to put this command into ~/.cshrc, because every
csh you run without the `-f' option, even ones started to run csh scripts,
reads that file.  If you must put the command in ~/.cshrc, use something
like

	if ( $?prompt ) exec /usr/gnu/bin/bash --login

to ensure that bash is exec'd only when the csh is interactive.

If your login shell is sh or ksh, you have to do two things.

First, create an empty file in your home directory named `.bash_profile'.
The existence of this file will prevent the exec'd bash from trying to
read ~/.profile, and re-execing itself over and over again.  ~/.bash_profile
is the first file bash tries to read initialization commands from when
it is invoked as a login shell.

Next, add a line similar to the above to ~/.profile:

        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login

This will cause login shells to replace themselves with bash running as
a login shell.  Once you have this working, you can copy your initialization
code from ~/.profile to ~/.bash_profile.

I have received word that the recipe supplied above is insufficient for
machines running CDE.  CDE has a maze of twisty little startup files, all
slightly different.

If you cannot change your login shell in the password file to bash, you
will have to (apparently) live with CDE using the shell in the password
file to run its startup scripts.  If you have changed your shell to bash,
there is code in the CDE startup files (on Solaris, at least) to do the
right thing. 

`dtterm' claims to use $SHELL as the default program to start, so if you
can change $SHELL in the CDE startup files, you should be able to use bash
in your terminal windows.

Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program
to read your login shell's startup files.  You may be able to use bash for
the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as
well, but I have not tried this.

You can use the above `exec' recipe to start bash when not logging in with
CDE by testing the value of the DT variable:

	if [ -n "$DT" ]; then
	        [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
	fi


A8) I just changed my login shell to bash, and now I can't FTP into my
   machine.  Why not?

You must add the full pathname to bash to the file /etc/shells.  As
noted in the answer to the previous question, many systems require
this before you can make bash your login shell. 

Most versions of ftpd use this file to prohibit `special' users
such as `uucp' and `news' from using FTP. 

A9)  What's the `POSIX 1003.2 standard'?

POSIX is a name originally coined by Richard Stallman for a
family of open system standards based on UNIX.  There are a
number of aspects of UNIX under consideration for
standardization, from the basic system services at the system
call and C library level to applications and tools to system
administration and management.  Each area of standardization is
assigned to a working group in the 1003 series. 

The POSIX Shell and Utilities standard has been developed by IEEE
Working Group 1003.2 (POSIX.2).  It concentrates on the command
interpreter interface and utility programs commonly executed from
the command line or by other programs.  An initial version of the
standard has been approved and published by the IEEE, and work is
currently underway to update it. 

Bash is concerned with the aspects of the shell's behavior
defined by POSIX.2.  The shell command language has of course
been standardized, including the basic flow control and program
execution constructs, I/O redirection and pipelining, argument
handling, variable expansion, and quoting. 

The `special' builtins, which must be implemented as part of the
shell to provide the desired functionality, are specified as
being part of the shell; examples of these are `eval' and
`export'.  Other utilities appear in the sections of POSIX.2 not
devoted to the shell which are commonly (and in some cases must
be) implemented as builtin commands, such as `read' and `test'. 
POSIX.2 also specifies aspects of the shell's interactive
behavior as part of the UPE, including job control and command
line editing.  Only vi-style line editing commands have been
standardized; emacs editing commands were left out due to
objections.

A10)  What is the bash `posix mode'?

Although bash is an implementation of the POSIX.2 shell
specification, there are areas where the bash default behavior
differs from that spec.  The bash `posix mode' changes the bash
behavior in these areas so that it obeys the spec more closely. 

Posix mode is entered by starting bash with the --posix option or
executing `set -o posix' after bash is running.

The specific aspects of bash which change when posix mode is
active are listed in the file CWRU/POSIX.NOTES in the bash
distribution.  They are also listed in a section in the Bash
Reference Manual.

Section B:  The latest version

B1) What's new in version 2.04?

Bash-2.04 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-2.04
distribution):

o Programmable word completion with the new `complete' and `compgen' builtins;
  examples are provided in examples/complete/complete-examples
o `history' has a new `-d' option to delete a history entry
o `bind' has a new `-x' option to bind key sequences to shell commands
o The prompt expansion code has new `\j' and `\l' escape sequences
o The `no_empty_cmd_completion' shell option, if enabled, inhibits
  command completion when TAB is typed on an empty line
o `help' has a new `-s' option to print a usage synopsis
o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
o New ksh93-style arithmetic for command:
	for ((expr1 ; expr2; expr3 )); do list; done
o `read' has new options: `-t', `-n', `-d', `-s'
o The redirection code handles several filenames specially:  /dev/fd/N,
  /dev/stdin, /dev/stdout, /dev/stderr
o The redirection code now recognizes /dev/tcp/HOST/PORT and
  /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
  to the specified port on the specified host
o The ${!prefix*} expansion has been implemented
o A new FUNCNAME variable, which expands to the name of a currently-executing
  function
o The GROUPS variable is no longer readonly
o A new shopt `xpg_echo' variable, to control the behavior of echo with
  respect to backslash-escape sequences at runtime
o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned

The version of Readline released with Bash-2.04, Readline-4.1, has several
new features as well:

o Parentheses matching is always compiled into readline, and controllable
  with the new `blink-matching-paren' variable
o The history-search-forward and history-search-backward functions now leave
  point at the end of the line when the search string is empty, like
  reverse-search-history, and forward-search-history
o A new function for applications:  rl_on_new_line_with_prompt()
o New variables for applications:  rl_already_prompted, and rl_gnu_readline_p


A short feature history dating from bash-2.0:

Bash-2.03 had very few new features, in keeping with the convention
that odd-numbered releases provide mainly bug fixes.  A number of new
features were added to Readline, mostly at the request of the Cygnus
folks.

A new shopt option, `restricted_shell', so that startup files can test
	whether or not the shell was started in restricted mode
Filename generation is now performed on the words between ( and ) in
	compound array assignments (this is really a bug fix)
OLDPWD is now auto-exported, as POSIX.2 requires
ENV and BASH_ENV are read-only variables in a restricted shell
Bash may now be linked against an already-installed Readline library,
	as long as the Readline library is version 4 or newer
All shells begun with the `--login' option will source the login shell
	startup files, even if the shell is not interactive

There were lots of changes to the version of the Readline library released
along with Bash-2.03.  For a complete list of the changes, read the file
CHANGES in the Bash-2.03 distribution.

Bash-2.02 contained the following new features:

a new version of malloc (based on the old GNU malloc code in previous
	bash versions) that is more page-oriented, more conservative
	with memory usage, does not `orphan' large blocks when they
	are freed, is usable on 64-bit machines, and has allocation
	checking turned on unconditionally
POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
POSIX.2-style globbing equivalence classes
POSIX.2-style globbing collating symbols
the ksh [[...]] extended conditional command
the ksh egrep-style extended pattern matching operators
a new `printf' builtin
the ksh-like $(<filename) command substitution, which is equivalent to
	$(cat filename)
new tilde prefixes that expand to directories from the directory stack
new `**' arithmetic operator to do exponentiation
case-insensitive globbing (filename expansion)
menu completion a la tcsh
`magic-space' history expansion function like tcsh
the readline inputrc `language' has a new file inclusion directive ($include)

Bash-2.01 contained only a few new features:

new `GROUPS' builtin array variable containing the user's group list
new bindable readline commands: history-and-alias-expand-line and
	alias-expand-line

Bash-2.0 contained extensive changes and new features from bash-1.14.7.
Here's a short list:

new `time' reserved word to time pipelines, shell builtins, and
	shell functions
one-dimensional arrays with a new compound assignment statement,
        appropriate expansion constructs and modifications to some
	of the builtins (read, declare, etc.) to use them
new quoting syntaxes for ANSI-C string expansion and locale-specific
	string translation
new expansions to do substring extraction, pattern replacement, and
	indirect variable expansion
new builtins: `disown' and `shopt'
new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
	       MACHTYPE, BASH_VERSINFO
special handling of many unused or redundant variables removed
	(e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
dynamic loading of new builtin commands; many loadable examples provided
new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
history and aliases available in shell scripts
new readline variables: enable-keypad, mark-directories, input-meta,
	visible-stats, disable-completion, comment-begin
new readline commands to manipulate the mark and operate on the region
new readline emacs mode commands and bindings for ksh-88 compatibility
updated and extended builtins
new DEBUG trap
expanded (and now documented) restricted shell mode

implementation stuff:	
autoconf-based configuration
nearly all of the bugs reported since version 1.14 have been fixed
most builtins converted to use builtin `getopt' for consistency
most builtins use -p option to display output in a reusable form
	(for consistency)
grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded

B2) Are there any user-visible incompatibilities between bash-2.04 and
    bash-1.14.7?

There are a few incompatibilities between version 1.14.7 and version 2.04.
They are detailed in the file COMPAT in the bash-2.04 distribution.

Section C:  Differences from other Unix shells

C1) How does bash differ from sh, the Bourne shell?

This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell.  The bash manual page explains these more
completely.

Things bash has that sh does not:
	long invocation options
	`!' reserved word to invert pipeline return value
	`time' reserved word to time pipelines and shell builtins
	the `function' reserved word
	the `select' compound command and reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	new $'...' and $"..." quoting
	the $(...) form of command substitution
	the $(<filename) form of command substitution, equivalent to
		$(cat filename)
	the ${#param} parameter value length operator
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
	expansion of positional parameters beyond $9 with ${num}
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
		   TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
		   LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
		   ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
		   HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
		   PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
		   SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
		   auto_resume
	DEBUG trap
	variable arrays with new compound assignment syntax
	redirections: <>, &>, >|
	prompt string special char translation and variable expansion
	auto-export of variables in initial environment
	command search finds functions before builtins
	bash return builtin will exit a file sourced with `.'
	builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -p.
		  export -n/-f/-p/name=value, pwd -L/-P,
		  read -e/-p/-a/-t/-n/-d/-s,
		  readonly -a/-f/name=value, trap -l, set +o,
		  set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
		  unset -f/-v, ulimit -m/-p/-u,
		  type -a/-p/-t, suspend -f, kill -n,
		  test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
	bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
	bash restricted shell mode is more extensive
	bash allows functions and variables with the same name
	brace expansion
	tilde expansion
	arithmetic expansion with $((...)) and `let' builtin
	the `[[...]]' extended conditional command
	process substitution
	aliases and alias/unalias builtins
	local variables in functions and `local' builtin
	readline and command-line editing with programmable completion
	command history and history/fc builtins
	csh-like history expansion
	other new bash builtins: bind, command, compgen, complete, builtin,
				 declare/typeset, dirs, enable, fc, help,
				 history, logout, popd, pushd, disown, shopt,
				 printf
	exported functions
	filename generation when using output redirection (command >a*)
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	variable assignments preceding commands affect only that command,
		even for builtins and functions
	posix mode
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
		/dev/tcp/host/port, /dev/udp/host/port

Things sh has that bash does not:
	uses variable SHACCT to do shell accounting
	includes `stop' builtin (bash can use alias stop='kill -s STOP')
	`newgrp' builtin
	turns on job control if called as `jsh'
	$TIMEOUT (like bash $TMOUT)
	`^' is a synonym for `|'
	new SVR4.2 sh builtins: mldmode, priv

Implementation differences:
	redirection to/from compound commands causes sh to create a subshell
	bash does not allow unbalanced quotes; sh silently inserts them at EOF
	bash does not mess with signal 11
	sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100
	bash splits only the results of expansions on IFS, using POSIX.2
		field splitting rules; sh splits all words on IFS
	sh does not allow MAILCHECK to be unset (?)
	sh does not allow traps on SIGALRM or SIGCHLD
	bash allows multiple option arguments when invoked (e.g. -x -v);
		sh allows only a single option argument (`sh -x -v' attempts
		to open a file named `-v', and, on SunOS 4.1.4, dumps core.
		On Solaris 2.4 and earlier versions, sh goes into an infinite
		loop.)
	sh exits a script if any builtin fails; bash exits only if one of
		the POSIX.2 `special' builtins fails

C2)  How does bash differ from the Korn shell, version ksh88?

Things bash has or uses that ksh88 does not:
	long invocation options
	`!' reserved word
	arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
	posix mode and posix conformance
	command hashing
	tilde expansion for assignment statements that look like $PATH
	process substitution with named pipes if /dev/fd is not available
	the ${!param} indirect parameter expansion operator
	the ${!param*} prefix expansion operator
	the ${param:length[:offset]} parameter substring operator
	the ${param/pat[/string]} parameter pattern substitution operator
	variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
		   TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
		   HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
		   IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
		   PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
		   GROUPS, FUNCNAME, histchars, auto_resume
	prompt expansion with backslash escapes and command substitution
	redirection: &> (stdout and stderr)
	more extensive and extensible editing and programmable completion
	builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
		  exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
		  jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
		  read -e/-p/-a/-t/-n/-d/-s, readonly -a/-n/-f/-p,
		  set -o braceexpand/-o histexpand/-o interactive-comments/
		  -o notify/-o physical/-o posix/-o hashall/-o onecmd/
		  -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
		  typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
		  disown, printf, complete, compgen
	`!' csh-style history expansion
	POSIX.2-style globbing character classes
	POSIX.2-style globbing equivalence classes
	POSIX.2-style globbing collating symbols
	egrep-like extended pattern matching operators
	case-insensitive pattern matching and globbing
	`**' arithmetic operator to do exponentiation
	redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr

Things ksh88 has or uses that bash does not:
	tracked aliases
	variables: ERRNO, FPATH, EDITOR, VISUAL
	co-processes (|&, >&p, <&p)
	weirdly-scoped functions
	typeset +f to list all function names without definitions
	text of command history kept in a file, not memory
	builtins: alias -x, cd old new, fc -e -, newgrp, print,
		  read -p/-s/-u/var?prompt, set -A/-o gmacs/
		  -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s,
		  typeset -H/-L/-R/-A/-ft/-fu/-fx/-l/-u/-t, whence

Implementation differences:
	ksh runs last command of a pipeline in parent shell context
	bash has brace expansion by default (ksh88 compile-time option)
	bash has fixed startup file for all interactive shells; ksh reads $ENV
	bash has exported functions
	bash command search finds functions before builtins

C3)  Which new features in ksh-93 are not in bash, and which are?

New things in ksh-93 not in bash-2.04:
	associative arrays
	floating point arithmetic
	math library functions
	${!name[sub]} name of subscript for associative array
	`.' is allowed in variable names to create a hierarchical namespace
	more extensive compound assignment syntax
	discipline functions
	`sleep' and `getconf' builtins (bash has loadable versions)
	typeset -n and `nameref' variables
	KEYBD trap
	variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
		   .sh.name, .sh.subscript, .sh.value, HISTEDIT
	backreferences in pattern matching
	print -f (bash uses printf)
	`fc' has been renamed to `hist'
	`.' can execute shell functions

New things in ksh-93 present in bash-2.04:
        for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
        ?:, ++, --, `expr1 , expr2' arithmetic operators
	expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]},
		    ${!param*}
	compound array assignment
	the `!' reserved word
	loadable builtins -- but ksh uses `builtin' while bash uses `enable'
	`command', `builtin', `disown' builtins
	new $'...' and $"..." quoting
	FIGNORE (but bash uses GLOBIGNORE), HISTCMD
	set -o notify/-C
	changes to kill builtin
	read -A (bash uses read -a)
        read -t/-d
	trap -p
	exec -c/-a
	`.' restores the positional parameters when it completes
	POSIX.2 `test'
	umask -S
	unalias -a
	command and arithmetic substitution performed on PS1, PS4, and ENV
	command name completion
	ENV processed only for interactive shells

Section D:  Why does bash do some things differently than other Unix shells?

D1) Why does bash run a different version of `command' than
    `which command' says it will?

On many systems, `which' is actually a csh script that assumes
you're running csh.  In tcsh, `which' and its cousin `where'
are builtins.  On other Unix systems, `which' is a perl script
that uses the PATH environment variable.

The csh script version reads the csh startup files from your
home directory and uses those to determine which `command' will
be invoked.  Since bash doesn't use any of those startup files,
there's a good chance that your bash environment differs from
your csh environment.  The bash `type' builtin does everything
`which' does, and will report correct results for the running
shell.  If you're really wedded to the name `which', try adding
the following function definition to your .bashrc:

	which()
	{
		builtin type "$@"
	}

If you're moving from tcsh and would like to bring `where' along
as well, use this function:

	where()
	{
		builtin type -a "$@"
	}

D2) Why doesn't bash treat brace expansions exactly like csh?

The only difference between bash and csh brace expansion is that
bash requires a brace expression to contain at least one unquoted
comma if it is to be expanded.  Any brace-surrounded word not
containing an unquoted comma is left unchanged by the brace
expansion code.  This affords the greatest degree of sh
compatibility. 

Bash, ksh, zsh, and pd-ksh all implement brace expansion this way. 

D3) Why doesn't bash have csh variable modifiers?

Posix has specified a more powerful, albeit somewhat more cryptic,
mechanism cribbed from ksh, and bash implements it.

${parameter%word}
        Remove smallest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the suffix matched by the pattern deleted.

        x=file.c
        echo ${x%.c}.o
        -->file.o

${parameter%%word}

        Remove largest suffix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the suffix matched by the pattern deleted.

        x=posix/src/std
        echo ${x%%/*}
        -->posix

${parameter#word}
        Remove smallest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        smallest portion of the prefix matched by the pattern deleted.

        x=$HOME/src/cmd
        echo ${x#$HOME}
        -->/src/cmd

${parameter##word}
        Remove largest prefix pattern.  The WORD is expanded to produce
        a pattern.  It then expands to the value of PARAMETER, with the
        largest portion of the prefix matched by the pattern deleted.

        x=/one/two/three
        echo ${x##*/}
        -->three


Given
	a=/a/b/c/d
	b=b.xxx

	csh			bash		result
	---			----		------
	$a:h			${a%/*}		   /a/b/c
	$a:t			${a##*/}	   d
	$b:r			${b%.*}		   b
	$b:e			${b##*.}	   xxx


D4) How can I make my csh aliases work when I convert to bash?

Bash uses a different syntax to support aliases than csh does. 
The details can be found in the documentation.  We have provided
a shell script which does most of the work of conversion for you;
this script can be found in ./examples/misc/alias-conv.sh.  Here is
how you use it:
  
Start csh in the normal way for you.  (e.g., `csh')
  
Pipe the output of `alias' through `alias-conv.sh', saving the
results into `bash_aliases':
  
	alias | alias-conv.sh >bash_aliases
  
Edit `bash_aliases', carefully reading through any created
functions.  You will need to change the names of some csh specific
variables to the bash equivalents.  The script converts $cwd to
$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt
to $PS1.  You may also have to add quotes to avoid unwanted
expansion.

For example, the csh alias:
  
	alias cd 'cd \!*; echo $cwd'
  
is converted to the bash function:

	cd () { command cd "$@"; echo $PWD ; }

The only thing that needs to be done is to quote $PWD:
  
	cd () { command cd "$@"; echo "$PWD" ; }
  
Merge the edited file into your ~/.bashrc.

There is an additional, more ambitious, script in
examples/misc/cshtobash that attempts to convert your entire csh
environment to its bash equivalent.  This script can be run as
simply `cshtobash' to convert your normal interactive
environment, or as `cshtobash ~/.login' to convert your login
environment. 

D5) How can I pipe standard output and standard error from one command to
    another, like csh does with `|&'?

Use
	command 2>&1 | command2

The key is to remember that piping is performed before redirection, so
file descriptor 1 points to the pipe when it is duplicated onto file
descriptor 2.

D6) Now that I've converted from ksh to bash, are there equivalents to
    ksh features like autoloaded functions and the `whence' command?

There are features in ksh-88 and ksh-93 that do not have direct bash
equivalents.  Most, however, can be emulated with very little trouble.

ksh-88 feature		Bash equivalent
--------------		---------------
compiled-in aliases	set up aliases in .bashrc; some ksh aliases are
			bash builtins (hash, history, type)
coprocesses		named pipe pairs (one for read, one for write)
typeset +f		declare -F
cd, print, whence	function substitutes in examples/functions/kshenv
autoloaded functions	examples/functions/autoload is the same as typeset -fu
read var?prompt		read -p prompt var

ksh-93 feature		Bash equivalent
--------------		---------------
sleep, getconf		Bash has loadable versions in examples/loadables
${.sh.version}		$BASH_VERSION
print -f		printf
hist			alias fc=hist
$HISTEDIT		$FCEDIT

Section E:  How can I get bash to do certain things, and why does bash do
	    things the way it does?

E1) Why is the bash builtin `test' slightly different from /bin/test?

The specific example used here is [ ! x -o x ], which is false.

Bash's builtin `test' implements the Posix.2 spec, which can be
summarized as follows (the wording is due to David Korn):
   
Here is the set of rules for processing test arguments.
  
    0 Args: False
    1 Arg:  True iff argument is not null.
    2 Args: If first arg is !, True iff second argument is null.
	    If first argument is unary, then true if unary test is true
	    Otherwise error.
    3 Args: If second argument is a binary operator, do binary test of $1 $3
	    If first argument is !, negate two argument test of $2 $3
	    If first argument is `(' and third argument is `)', do the
	    one-argument test of the second argument.
	    Otherwise error.
    4 Args: If first argument is !, negate three argument test of $2 $3 $4.
	    Otherwise unspecified
    5 or more Args: unspecified.  (Historical shells would use their
    current algorithm).
   
The operators -a and -o are considered binary operators for the purpose
of the 3 Arg case.
   
As you can see, the test becomes (not (x or x)), which is false.

E2) Why does bash sometimes say `Broken pipe'?

If a sequence of commands appears in a pipeline, and one of the
reading commands finishes before the writer has finished, the
writer receives a SIGPIPE signal.  Many other shells special-case
SIGPIPE as an exit status in the pipeline and do not report it. 
For example, in:
  
      ps -aux | head
  
`head' can finish before `ps' writes all of its output, and ps
will try to write on a pipe without a reader.  In that case, bash
will print `Broken pipe' to stderr when ps is killed by a
SIGPIPE. 

You can build a version of bash that will not report SIGPIPE errors
by uncommenting the definition of DONT_REPORT_SIGPIPE in the file
config-top.h.

E3) When I have terminal escape sequences in my prompt, why does bash
    wrap lines at the wrong column?

Readline, the line editing library that bash uses, does not know
that the terminal escape sequences do not take up space on the
screen.  The redisplay code assumes, unless told otherwise, that
each character in the prompt is a `printable' character that
takes up one character position on the screen. 

You can use the bash prompt expansion facility (see the PROMPTING
section in the manual page) to tell readline that sequences of
characters in the prompt strings take up no screen space. 

Use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence. 

E4) If I pipe the output of a command into `read variable', why doesn't
    the output show up in $variable when the read command finishes?

This has to do with the parent-child relationship between Unix
processes. 

Each element of a pipeline runs in a separate process, a child of
the shell running the pipeline.  A subprocess cannot affect its
parent's environment.  When the `read' command sets the variable
to the input, that variable is set only in the subshell, not the
parent shell.  When the subshell exits, the value of the variable
is lost. 

Many pipelines that end with `read variable' can be converted
into command substitutions, which will capture the output of
a specified command.  The output can then be assigned to a
variable:

	grep ^gnu /usr/lib/news/active | wc -l | read ngroup

can be converted into

	ngroup=$(grep ^gnu /usr/lib/news/active | wc -l)

This does not, unfortunately, work to split the text among
multiple variables, as read does when given multiple variable
arguments.  If you need to do this, you can either use the
command substitution above to read the output into a variable
and chop up the variable using the bash pattern removal
expansion operators or use some variant of the following
approach.

Say /usr/local/bin/ipaddr is the following shell script:

#! /bin/sh
host `hostname` | awk '/address/ {print $NF}'

Instead of using

	/usr/local/bin/ipaddr | read A B C D

to break the local machine's IP address into separate octets, use

	OIFS="$IFS"
	IFS=.
	set -- $(/usr/local/bin/ipaddr)
	IFS="$OIFS"
	A="$1" B="$2" C="$3" D="$4"

Beware, however, that this will change the shell's positional
parameters.  If you need them, you should save them before doing
this.

This is the general approach -- in most cases you will not need to
set $IFS to a different value.

E5) I have a bunch of shell scripts that use backslash-escaped characters
    in arguments to `echo'.  Bash doesn't interpret these characters.  Why
    not, and how can I make it understand them?

This is the behavior of echo on most Unix System V machines.

The bash builtin `echo' is modeled after the 9th Edition
Research Unix version of `echo'.  It does not interpret
backslash-escaped characters in its argument strings by default;
it requires the use of the -e option to enable the
interpretation.  The System V echo provides no way to disable the
special characters; the bash echo has a -E option to disable
them. 

There is a configuration option that will make bash behave like
the System V echo and interpret things like `\t' by default.  Run
configure with the --enable-usg-echo-default option to turn this
on.  Be aware that this will cause some of the tests run when you
type `make tests' to fail.

There is a shell option, `xpg_echo', settable with `shopt' that will
change the behavior of echo at runtime.  Enabling this option turns
on expansion of backslash-escape sequences.

E6) Why doesn't a while or for loop get suspended when I type ^Z?

This is a consequence of how job control works on Unix.  The only
thing that can be suspended is the process group.  This is a single
command or pipeline of commands that the shell forks and executes.

When you run a while or for loop, the only thing that the shell forks
and executes are any commands in the while loop test and commands in
the loop bodies.  These, therefore, are the only things that can be
suspended when you type ^Z.

If you want to be able to stop the entire loop, you need to put it
within parentheses, which will force the loop into a subshell that
may be stopped (and subsequently restarted) as a single unit.

E7) What about empty for loops in Makefiles?

It's fairly common to see constructs like this in automatically-generated
Makefiles:

SUBDIRS = @SUBDIRS@

	...

subdirs-clean:
	for d in $SUBDIRS; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done

When SUBDIRS is empty, this results in a command like this being passed to
bash:

	for d in ; do
		( cd $$d && ${MAKE} ${MFLAGS} clean )
	done

This is a syntax error.  If the reserved word `in' is present, a word must
follow it before the semicolon or newline.  The language in the manual page
referring to the list of words being empty refers to the list after it is
expanded.  There must be at least one word following the `in' when the
construct is parsed.

The idiomatic Makefile solution is something like:

SUBDIRS = @SUBDIRS@

subdirs-clean:
	subdirs=$SUBDIRS ; for d in $$subdirs; do \
		( cd $$d && ${MAKE} ${MFLAGS} clean ) \
	done


The POSIX.2 interpretation committee has considered this issue and declared
that the bash implemenation is correct, according to the standard:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-169.html

E8) Why does the arithmetic evaluation code complain about `08'?

The bash arithmetic evaluation code (used for `let', $(()), (()), and in
other places), interprets a leading `0' in numeric constants as denoting
an octal number, and a leading `0x' as denoting hexadecimal.  This is
in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
arithmetic constants should be handled as signed long integers as defined
by the ANSI/ISO C standard.

The POSIX.2 interpretation committee has confirmed this:

http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html

Section F:  Things to watch out for on certain Unix versions

F1) Why can't I use command line editing in my `cmdtool'?

The problem is `cmdtool' and bash fighting over the input.  When
scrolling is enabled in a cmdtool window, cmdtool puts the tty in
`raw mode' to permit command-line editing using the mouse for
applications that cannot do it themselves.  As a result, bash and
cmdtool each try to read keyboard input immediately, with neither
getting enough of it to be useful.

This mode also causes cmdtool to not implement many of the
terminal functions and control sequences appearing in the
`sun-cmd' termcap entry.  For a more complete explanation, see
that file examples/suncmd.termcap in the bash distribution. 

`xterm' is a better choice, and gets along with bash much more
smoothly.

If you must use cmdtool, you can use the termcap description in
examples/suncmd.termcap.  Set the TERMCAP variable to the terminal
description contained in that file, i.e.

TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:'

Then export TERMCAP and start a new cmdtool window from that shell.
The bash command-line editing should behave better in the new
cmdtool.  If this works, you can put the assignment to TERMCAP
in your bashrc file.

F2) I built bash on Solaris 2.  Why do globbing expansions and filename
    completion chop off the first few characters of each filename?

This is the consequence of building bash on SunOS 5 and linking
with the libraries in /usr/ucblib, but using the definitions
and structures from files in /usr/include. 

The actual conflict is between the dirent structure in
/usr/include/dirent.h and the struct returned by the version of
`readdir' in libucb.a (a 4.3-BSD style `struct direct'). 

Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH
when configuring and building bash.  This will ensure that you
use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you
link with libc before libucb. 

If you have installed the Sun C compiler, you may also need to
put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before
/usr/ucb.

F3) Why does bash dump core after I interrupt username completion or
    `~user' tilde expansion on a machine running NIS?

This is a famous and long-standing bug in the SunOS YP (sorry, NIS)
client library, which is part of libc.

The YP library code keeps static state -- a pointer into the data
returned from the server.  When YP initializes itself (setpwent),
it looks at this pointer and calls free on it if it's non-null. 
So far, so good. 

If one of the YP functions is interrupted during getpwent (the
exact function is interpretwithsave()), and returns NULL, the
pointer is freed without being reset to NULL, and the function
returns.  The next time getpwent is called, it sees that this
pointer is non-null, calls free, and the bash free() blows up
because it's being asked to free freed memory. 

The traditional Unix mallocs allow memory to be freed multiple
times; that's probably why this has never been fixed.  You can
run configure with the `--without-gnu-malloc' option to use
the C library malloc and avoid the problem.

F4) I'm running SVR4.2.  Why is the line erased every time I type `@'?

The `@' character is the default `line kill' character in most
versions of System V, including SVR4.2.  You can change this
character to whatever you want using `stty'.  For example, to
change the line kill character to control-u, type

	stty kill ^U

where the `^' and `U' can be two separate characters.

F5) Why does bash report syntax errors when my C News scripts use a
    redirection before a subshell command?

The actual command in question is something like

	< file ( command )

According to the grammar given in the POSIX.2 standard, this construct
is, in fact, a syntax error.  Redirections may only precede `simple
commands'.  A subshell construct such as the above is one of the shell's
`compound commands'.  A redirection may only follow a compound command.

This affects the mechanical transformation of commands that use `cat'
to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on
comp.unix.shell).  While most commands of the form

	cat file | command

can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.

The file CWRU/sh-redir-hack in the bash-2.04 distribution is an
(unofficial) patch to parse.y that will modify the grammar to
support this construct.  It will not apply with `patch'; you must
modify parse.y by hand.  Note that if you apply this, you must
recompile with -DREDIRECTION_HACK.  This introduces a large
number of reduce/reduce conflicts into the shell grammar. 

F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?

The short answer is that Red Hat screwed up.

The long answer is that they shipped an /etc/inputrc that only works
for emacs mode editing, and then screwed all the vi users by setting
INPUTRC to /etc/inputrc in /etc/profile.

The short fix is to do one of the following: remove or rename
/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile,
but make sure you export it if you do), remove the assignment to
INPUTRC from /etc/profile, add

        set keymap emacs

to the beginning of /etc/inputrc, or bracket the key bindings in
/etc/inputrc with these lines

	$if mode=emacs
		[...]
	$endif

Section G:  How can I get bash to do certain common things?

G1) How can I get bash to read and display eight-bit characters?

This is a process requiring several steps.

First, you must ensure that the `physical' data path is a full eight
bits.  For xterms, for example, the `vt100' resources `eightBitInput'
and `eightBitOutput' should be set to `true'.

Once you have set up an eight-bit path, you must tell the kernel and
tty driver to leave the eighth bit of characters alone when processing
keyboard input.  Use `stty' to do this:

	stty cs8 -istrip -parenb

For old BSD-style systems, you can use

	stty pass8

You may also need

	stty even odd

Finally, you need to tell readline that you will be inputting and
displaying eight-bit characters.  You use readline variables to do
this.  These variables can be set in your .inputrc or using the bash
`bind' builtin.  Here's an example using `bind':

	bash$ bind 'set convert-meta off'
	bash$ bind 'set meta-flag on'
	bash$ bind 'set output-meta on'

The `set' commands between the single quotes may also be placed
in ~/.inputrc.

G2) How do I write a function `x' to replace builtin command `x', but
    still invoke the command from within the function?

This is why the `command' and `builtin' builtins exist.  The
`command' builtin executes the command supplied as its first
argument, skipping over any function defined with that name.  The
`builtin' builtin executes the builtin command given as its first
argument directly. 

For example, to write a function to replace `cd' that writes the
hostname and current directory to an xterm title bar, use
something like the following:

	cd()
	{
		builtin cd "$@" && xtitle "$HOST: $PWD"
	}

This could also be written using `command' instead of `builtin';
the version above is marginally more efficient. 

G3) How can I find the value of a shell variable whose name is the value
    of another shell variable?

Versions of Bash newer than Bash-2.0 support this directly.  You can use 

	${!var}

For example, the following sequence of commands will echo `z':

	var1=var2
	var2=z
	echo ${!var1}

For sh compatibility, use the `eval' builtin.  The important
thing to remember is that `eval' expands the arguments you give
it again, so you need to quote the parts of the arguments that
you want `eval' to act on. 

For example, this expression prints the value of the last positional
parameter:

	eval echo \"\$\{$#\}\"

The expansion of the quoted portions of this expression will be
deferred until `eval' runs, while the `$#' will be expanded
before `eval' is executed.  In versions of bash later than bash-2.0,

	echo ${!#}

does the same thing.

G4) How can I make the bash `time' reserved word print timing output that
     looks like the output from my system's /usr/bin/time?

The bash command timing code looks for a variable `TIMEFORMAT' and
uses its value as a format string to decide how to display the
timing statistics.

The value of TIMEFORMAT is a string with `%' escapes expanded in a
fashion similar in spirit to printf(3).  The manual page explains
the meanings of the escape sequences in the format string.

If TIMEFORMAT is not set, bash acts as if the following assignment had
been performed:

	TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'

The POSIX.2 default time format (used by `time -p command') is

	TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'

The BSD /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys'

The System V /usr/bin/time format can be emulated with:

	TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S'

The ksh format can be emulated with:

	TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS'

G5) How do I get the current directory into my prompt?

Bash provides a number of backslash-escape sequences which are expanded
when the prompt string (PS1 or PS2) is displayed.  The full list is in
the manual page.

The \w expansion gives the full pathname of the current directory, with
a tilde (`~') substituted for the current value of $HOME.  The \W
expansion gives the basename of the current directory.  To put the full
pathname of the current directory into the path without any tilde
subsitution, use $PWD.  Here are some examples:

	PS1='\w$ '	# current directory with tilde
	PS1='\W$ '	# basename of current directory
	PS1='$PWD$ '	# full pathname of current directory

The single quotes are important in the final example to prevent $PWD from
being expanded when the assignment to PS1 is performed.

G6) How can I rename "*.foo" to "*.bar"?

Use the pattern removal functionality described in D3.  The following `for'
loop will do the trick:

	for f in *.foo; do
		mv $f ${f%foo}bar
	done

G7) How can I translate a filename from uppercase to lowercase?

The script examples/functions/lowercase, originally written by John DuBois,
will do the trick.  The converse is left as an exercise.

G8) How can I write a filename expansion (globbing) pattern that will match
    all files in the current directory except "." and ".."?

You must have set the `extglob' shell option using `shopt -s extglob' to use
this:

	echo .!(.|) *

A solution that works without extended globbing is given in the Unix Shell
FAQ, posted periodically to comp.unix.shell.

Section H:  Where do I go from here?

H1) How do I report bugs in bash, and where should I look for fixes and
    advice?

Use the `bashbug' script to report bugs.  It is built and
installed at the same time as bash.  It provides a standard
template for reporting a problem and automatically includes
information about your configuration and build environment. 

`bashbug' sends its reports to bug-bash@gnu.org, which
is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug. 

Bug fixes, answers to questions, and announcements of new releases
are all posted to gnu.bash.bug.  Discussions concerning bash features
and problems also take place there.

To reach the bash maintainers directly, send mail to
bash-maintainers@gnu.org.

H2) What kind of bash documentation is there?

First, look in the doc directory in the bash distribution.  It should
contain at least the following files:

bash.1		an extensive, thorough Unix-style manual page
builtins.1	a manual page covering just bash builtin commands
bashref.texi	a reference manual in GNU tex`info format
bashref.info	an info version of the reference manual
FAQ		this file
article.ms	text of an article written for The Linux Journal
readline.3	a man page describing readline

Postscript, HTML, and ASCII files created from the above source are
available in the documentation distribution.

There is additional documentation available for anonymous FTP from host
ftp.cwru.edu in the `pub/bash' directory.

Cameron Newham and Bill Rosenblatt have written a book on bash, published
by O'Reilly and Associates.  The book is based on Bill Rosenblatt's Korn
Shell book.  The title is ``Learning the Bash Shell'', and the ISBN number
is 1-56592-147-X.  Look for it in fine bookstores near you.  This book
covers bash-1.14, but has an appendix describing some of the new features
in bash-2.0.  

A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2.  Look for it in the same fine bookstores
or on the web.

H3) What's coming in future versions?

These are features I plan to include in a future version of bash.

a bash debugger (a minimally-tested version is included with bash-2.04)
associative arrays

H4) What's on the bash `wish list' for future versions?

These are features that may or may not appear in a future version of bash.

breaking some of the shell functionality into embeddable libraries
a module system like zsh's, using dynamic loading like builtins
better internationalization using GNU `gettext'
an option to use external files for the long `help' text
date-stamped command history
a bash programmer's guide with a chapter on creating loadable builtins
a better loadable interface to perl with access to the shell builtins and
	variables (contributions gratefully accepted)

H5) When will the next release appear?

The next version will appear sometime in 2000 or 2001.  Never make
predictions. 


This document is Copyright 1995-2000 by Chester Ramey.

Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
this document for any purpose, provided that the above copyright
notice appears in all copies of this document and that the
contents of this document remain unaltered.


From j-waldby@pat7.com Mon Nov 27 10:44:09 2000
Received: from ha1.rdc1.ne.home.com ([24.2.4.66] helo=mail.rdc1.ne.home.com)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 140QRt-0006RZ-00; Mon, 27 Nov 2000 10:44:09 -0500
Received: from pat7.com ([24.7.41.239]) by mail.rdc1.ne.home.com
          (InterMail vM.4.01.03.00 201-229-121) with ESMTP
          id <20001127154406.KJVR14242.mail.rdc1.ne.home.com@pat7.com>;
          Mon, 27 Nov 2000 07:44:06 -0800
Message-ID: <3A22812A.39C04C85@pat7.com>
Date: Mon, 27 Nov 2000 09:43:38 -0600
From: James Waldby <j-waldby@pat7.com>
Reply-To: j-waldby@pat7.com
Organization: SD
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org, bugbash@gnu.org
Subject: address bug and // bug
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Bug 1. "man bash" has a paragraph that says:
       Once you have determined that a bug actually exists, use the 
bashbug  command
       to submit a bug report.  If you have a fix, you are encouraged to
mail that as
       well!  Suggestions and `philosophical' bug  reports  may  be 
mailed  to  bug-
       bash@gnu.org or posted to the Usenet newsgroup gnu.bash.bug.


A serious problem in that paragraph is that the address,
bug-bash@gnu.org or bugbash@gnu.org, whichever it is,
is split across two lines in an ambiguous and time-wasting
manner.

-------------------------------------------------------------

Bug 2.  In pathnames, bash should treat // like / and while
it usually does do so, here is a transcript of a case where 
it acts oddly IMO.  For uname -a and bash --version see below.

-------begin-------------
root vyri /home > cd //

root vyri // > pwd
//

root vyri // > ls
bin   cd   etc   lib         mnt  proc  sbin  usr
boot  dev  home  lost+found  opt  root  tmp   var

root vyri // > cd ////

root vyri / > cd ///

root vyri / > cd /

root vyri / > cd //

root vyri // > pwd
//

root vyri // > cd ..

root vyri / > cd /

root vyri / > cd //

root vyri // > pwd
//

root vyri // > date
Mon Nov 27 09:18:35 CST 2000

root vyri // > set|grep PS1
PS1='\nroot \h \w > '

root vyri // > uname -a
Linux vyri.jiw 2.2.16-22 #1 Tue Aug 22 16:16:55 EDT 2000 i586 unknown

root vyri // > bash --version
GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)
Copyright 1999 Free Software Foundation, Inc.

root vyri // > ls -i .
  43009 bin     30721 etc           59393 mnt     69633 sbin
      2 boot        2 home          65537 opt         2 tmp
  84003 cd      53249 lib               1 proc        2 usr
  28673 dev        11 lost+found    67585 root    22529 var

root vyri // > ls -i ..
  43009 bin     30721 etc           59393 mnt     69633 sbin
      2 boot        2 home          65537 opt         2 tmp
  84003 cd      53249 lib               1 proc        2 usr
  28673 dev        11 lost+found    67585 root    22529 var

root vyri // > ls -i ../..
  43009 bin     30721 etc           59393 mnt     69633 sbin
      2 boot        2 home          65537 opt         2 tmp
  84003 cd      53249 lib               1 proc        2 usr
  28673 dev        11 lost+found    67585 root    22529 var

root vyri // > ls -i `pwd`
  43009 bin     30721 etc           59393 mnt     69633 sbin
      2 boot        2 home          65537 opt         2 tmp
  84003 cd      53249 lib               1 proc        2 usr
  28673 dev        11 lost+found    67585 root    22529 var

-------end--------


From chet@nike.ins.cwru.edu Mon Nov 27 12:29:44 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 140S63-0001Es-00
	for <bug-bash@gnu.org>; Mon, 27 Nov 2000 12:29:43 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id MAA89876; Mon, 27 Nov 2000 12:29:36 -0500 (EST) (from chet)
Date: Mon, 27 Nov 2000 12:27:28 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: cartan@t-online.de
Subject: Re: How do I disable MAILCHECK?
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001127172728.AA89871.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from cartan@t-online.de of 24 Nov 2000 01:55:01 +0100 (id <873dgi6vfe.fsf@darkstar.cartan>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I would like to disable the MAILCHECK feature, but no matter
> whether I set MAILCHECK to 0 or unset it, I always get these `New
> mail for cartan@darkstar has arrived:' lines in all of my open
> shells.  I am using
> 
> GNU bash, version 2.03.0(1)-release (i386-slackware-linux-gnu)
> 
> Any ideas?

Since that's not the message bash prints when you have new mail, I suspect
you're running some other mail checking program that doesn't know anything
about $MAILCHECK.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Tue Nov 28 09:39:21 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 140luj-00046f-00
	for <bug-bash@gnu.org>; Tue, 28 Nov 2000 09:39:21 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id JAA16111; Tue, 28 Nov 2000 09:42:54 -0500 (EST) (from chet)
Date: Tue, 28 Nov 2000 09:41:20 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: slynn@cpugeek.com
Subject: Re: Removing files
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001128144120.AA16108.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from slynn@cpugeek.com of Mon, 27 Nov 2000 15:51:21 -0800 (PST) (id <Pine.LNX.4.21.0011271545220.24713-100000@nerd.cpugeek.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I am not sure who the correct person to send this to is, but here goes...
> 
> The other day I was removing a file with the name "-I". I could not use
> "rm -I" for obvious reasons. But when I did "rm *", it still treated the
> file as a parameter. To me, this does not seem right. Please correct me if
> I am wrong.

How can `rm' distinguish between a file named `-I' and an option argument?
Since the shell does pathname expansion, rm cannot tell what arguments were
the result of that expansion.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From olk@olk.co.kr Tue Nov 28 14:16:33 2000
Received: from [211.49.129.168] (helo=smtp7.thrunet.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 140qEy-00051s-00
	for <bug-bash@gnu.org>; Tue, 28 Nov 2000 14:16:32 -0500
Received: from thrunet ([210.205.197.216]) by smtp7.thrunet.com  with Microsoft SMTPSVC(5.5.1877.197.19);
	 Wed, 29 Nov 2000 03:28:11 +0900
Date: Wed, 29 Nov 2000 03:30:13 +0900
From: "Online Korea"<olk@olk.co.kr>
To: bug-bash@gnu.org
Subject: bug-bash´Ô ¾È³çÇÏ¼¼¿ä? 
X-AD2000-Serial: 1033
X-AD2000-Register: "¹ÚÀçÇö" <olk@olk.co.kr>
MIME-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: base64
Message-ID: <014ec1128181cb0SMTP7@smtp7.thrunet.com>
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

PEhUTUw+DQo8SEVBRD4NCjxNRVRBIE5BTUU9IkdFTkVSQVRPUiIgQ29udGVudD0iTWljcm9z
b2Z0IERIVE1MIEVkaXRpbmcgQ29udHJvbCI+DQo8VElUTEU+PC9USVRMRT4NCjwvSEVBRD4N
CjxCT0RZPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPqLEIL/AtMPAxyDAr7jTIMfR
uLa18CCixTwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+Jm5ic3A7
ICJEYWQsIEkgZG9uJ3Qgd2FudCB0byBnbyB0byBzY2hvb2wgdG9kYXkuLCIgc2FpZCANCnRo
ZSBib3kuPEJSPiZuYnNwOyAiV2h5IG5vdCwgc29uPyI8QlI+Jm5ic3A7ICJXZWxsLCBvbmUg
b2YgdGhlIGNoaWNrZW5zIG9uIHRoZSANCnNjaG9vbCBmYXJtIGRpZWQgbGFzdCB3ZWVrIGFu
ZCA8QlI+Jm5ic3A7Jm5ic3A7IHdlIGhhZCBjaGlja2VuIHNvdXAgZm9yIGx1bmNoIA0KdGhl
IG5leHQgZGF5LiBBbmQgdGhyZWUgZGF5cyBhZ28gPEJSPiZuYnNwOyZuYnNwOyBvbmUgb2Yg
dGhlIHBpZ3MgZGllZCBhbmQgd2UgDQpoYWQgcm9hc3QgcG9yayB0aGUgbmV4dCBkYXksLCwu
IjxCUj4mbmJzcDsgIkJ1dCB3aHkgZG9uJ3QgeW91IHdhbnQgdG8gZ28gDQp0b2RheT8iPEJS
PiZuYnNwOyAiQmVjYXVzZSB0aGUgRW5nbGlzaCB0ZWFjaGVyIGRpZWQgeWVzdGVyZGF5ISI8
QlI+Jm5ic3A7IA0KIi4uLi4uIjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBz
aXplPTI+Jm5ic3A7ICK+xrr8LCCzqiC/wLTDIMfQsbMgsKGx4iC9yL7uLiIgx8+w7SC80rPi
wMwguLvH37TZLjxCUj4mbmJzcDsgIr/WILChseIgDQq9yL7uPyI8QlI+Jm5ic3A7ICLB9rOt
IMHWv6Egx9CxsyCz88Dlv6G8rSC03yDH0SC4triusKEgwde++rTCtaUgtNnAvbOvIMGhvcnA
uLfOIDxCUj4mbmJzcDsmbmJzcDsgtN8gvbrHwbimILjUvvq+7i4gDQqx17iusO0gM8DPIMD8
v6G0wiC1xcH2IMfRILi2uK6woSDB1776tMK1pSA8QlI+Jm5ic3A7Jm5ic3A7ILHXILTZwL0g
s6+/obTCILXFwfYgutKw7bHiuKYguNS++rDtLi4uLiI8QlI+Jm5ic3A7IA0KIrHXt7G1pSC/
wLTDwLogv9Ygx9Cxs7+hILChseIgvci+7j8iPEJSPiZuYnNwOyAivu7BpiC/tb7uILyxu/20
1MDMILW5vsawobzMtNwguLu+3yEiPEJSPiZuYnNwOyANCiIuLi4uLiI8L0ZPTlQ+PC9QPg0K
PFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPqLEIL/AtMPAxyC/tb7uIMfRuLa18CCixSZu
YnNwOyZuYnNwOyZuYnNwOyA8L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6
ZT0yPqLCIEkgZmVsdCBvbiB0b3Agb2YgdGhlIA0Kd29ybGQmbmJzcDsmbmJzcDsmbmJzcDsm
bmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsm
bmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsgDQo8L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2x
vLiyw7wgc2l6ZT0yPrvntvfAuiC0qbG4s6ogvLqw+MfPuOkgseK60MDMIMHBwLogsM3AuiC0
57+sx8/B9r/kLiA8QlI+ubC30Cwgvu62siC757b3tenAuiC8urD4x9/AuyC2p7+hILT1IA0K
sOK81cfYwfbB9ri4ILTrus660MDHILvntve16cC6IDxCUj5bs6q4piC6wSEgs7uwoSDD1rDt
vt9dtvOw7SC7/bCix9W0z7TZLiA8QlI+wMy/zSCwsMC6ILHiutDAuyCzqsW4s7u0wiDHpcf2
wMwgJ29uIHRvcCBvZiANCnRoZSB3b3JsZCe2+LTPtNkuPC9GT05UPjwvUD4NCjxQPjxGT05U
IGZhY2U9sby4ssO8IHNpemU9Mj5BOiBJIGhlYXJkIHlvdSB3ZXJlIGVuZ2FnZWQgdG8gTWFy
aWFuLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+QjogQWN0dWFs
bHksIEkgd2FzLjwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+QTog
T2gsIHJlYWxseT8gU28sIGhvdyBkaWQgeW91IGZlZWwgb24gdGhlIG5pZ2h0IG9mIA0KeW91
ciBlbmdhZ2VtZW50PzwvRk9OVD48L1A+DQo8UD48Rk9OVCBmYWNlPbG8uLLDvCBzaXplPTI+
QjogSSBmZWx0IGxpa2UgSSB3YXMgb24gdG9wIG9mIHRoZSB3b3JsZC48L0ZPTlQ+PC9QPg0K
PFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPqHhJ29uIHRvcCBvZiB0aGUgd29ybGQnuKYg
wfe/qsfPuOkgW7y8u/MgssC067Hiv6FdtvO0wiDAx7nMwMy45yANCjxCUj4mbmJzcDsgJ0kg
ZmVsdCBvbiB0b3Agb2YgdGhlIHdvcmxkLie0wiAivLy78yCywLTrseK/oSDA1rTCILTAs6bA
zL76tNkuIjxCUj4mbmJzcDsgwe8sICixssDlyPcgDQqx4rrQwMwgwcG+0rTZKbimILbmx9W0
z7TZLjxCUj4mbmJzcDsgyOfI9yBbseK60MDMIMHBvtK+7l2287TCIMDHucy3ziAnSSBmZWx0
IGdvb2QuJ7i4wLsgu/2wosfPseIgvay/7LOqIA0KPEJSPiZuYnNwOyDAzCDHpcf2tbUgvsuw
7SDA1sC4uOkgsKjBpMDHIMelx/bAuyC09SDA3yDH0iC89iDA1sC7ILDFv6G/5C48L0ZPTlQ+
PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPqLBICdvbiB0b3Agb2YgdGhlIHdv
cmxkJ7TCILy8u/MgssC067Hiv6EgwNa0wiC0wLOmIS4gsde3uLTZuOkgDQo8QlI+Jm5ic3A7
Jm5ic3A7ICdvdXQgb2YgdGhpcyB3b3JsZCe0wj8gwMwgvLy788DHIMDPILCwwfYgvsqw1CCx
2bvnx9Fbd29uZGVyZnVsXSwgDQo8QlI+Jm5ic3A7Jm5ic3A7IMikwLogyK+788D7wM5bZmFu
dGFzdGljXcDMtvUgtubAzL+hv+QuPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8
IHNpemU9Mj5BOiC43riuvsiw+iC+4Milx9G02bDtILXpvvq0wrWlLjxCUj5COiC7573HIMDM
ucwgx9++7i48QlI+QTogvu4sIA0KwaS4u8DMvt8/Jm5ic3A7ILHXt6EsvuDIpb3Ex9Egsdez
ryC547+hILHiutDAzCC+7rauvu4/PEJSPkI6ILy8u/PAuyC+8sC6ILHiutDAzL76wfYuPC9G
T05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6ixCC/wLTDwMcgwM++7iZu
YnNwOyDH0bi2tfAgosU8L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0y
PiZuYnNwOyZuYnNwOyCh2MDPvu61tSC/tb7uv80gsLDAuiDH/MXCt84gsbi8uiC1x77uIA0K
wNa9wLTPtNkuPEJSPi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLTxCUj5idWctYmFzaLTUIA0Kvsiz58fPvLy/5D8gPC9GT05U
PjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj7A+sjxtMIgwPzIrbimIMDMv+vH
2LytILCtu+e/zSAxOjG3ziC/3LG5vu4gx9C9wMC7IMfSILz2IMDWtMIgPEJSPqLEIE9ubGlu
ZSBLb3JlYSANClsmbmJzcDsgPEEgaHJlZj0iaHR0cDovL3d3dy5vbGsuY28ua3IiPmh0dHA6
Ly93d3cub2xrLmNvLmtyPC9BPiZuYnNwOyBdIKLFILbzsO0gDQrH1bTPtNkuPC9GT05UPjwv
UD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj641cD6LCDH47b0vvjAzCDG7cH2ILXl
t8Egwcu828fVtM+02S4gus618CCzyrHXt6+/7iC/67ytuKYuLi4uLi48L0ZPTlQ+PC9QPg0K
PFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPsD6yPEgyLi757+hvK20wiC/tb7uIMCvuNO/
zSC7/ciwIMi4yK2/oSCw/L3JIMDWtMIgutC16bKyILjFwM8ov/ktsd0pLCA8QlI+v7W+7iDA
r7jTv80gvccgDQq7/ciwv6Egx8q/5MfRILv9yLDIuMitIMfRILmuwOW+v8C7ILmrt+G3ziC6
uLO7ILXluK6w7SDA1r7uv+QuPC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNp
emU9Mj7Ap7/NsLDAuiCzu7/rwMcgvK268b26uKYgud6+xrq4seIgv/jHz73DuOkgoewgPEEg
DQpocmVmPSJtYWlsdG86b2xrQG9say5jby5rciI+b2xrQG9say5jby5rcjwvQT4goe23ziA8
QlI+InllcyK287TCILO7v+vAxyC05MDlwLsgwda9w7HiIA0Kudm2+LTPtNkuPC9GT05UPjwv
UD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj6x17iusO0sIMD6yPEgwPzIrSC/3LG5
vu4gsK3Ax7ChILHDsd3Hz73FILrQtenAuyDAp8fYJm5ic3A7IDxBIA0KaHJlZj0iaHR0cDov
L3d3dy5vbGsuY28ua3IvbGVjdHVyZV9mcmFtZS5odG0iPqLCIL3DufywrcDHIKLCIDwvQT61
tSA8QlI+Mci4v6Egx9HH2LytILmrt+G3ziANCr3HvcPHz7DtIMDWwLi0zyDH0bn4ILXpvu66
uLDtIL3NwLi9w7jpIMH2sd0gvcXDu8fYIMHWvLy/5C48L0ZPTlQ+PC9QPg0KPFA+PEZPTlQg
ZmFjZT2xvLiyw7wgc2l6ZT0yPrmrt+EgvcO5/LCtwMcgvcXDuyC55rn9wLogPEEgDQpocmVm
PSJodHRwOi8vd3d3Lm9say5jby5rci9sZWN0dXJlX2ZyYW1lLmh0bSI+orogv6mx4iCiuCA8
L0E+uKYgxay4r8fPvcUgyMQgsK3AxyC9xcO7tvW/oSANCsDWtMI8QlI+vcO5/LCtwMe4piC9
xcO7x8+9w7jpIMD6yPGwoSDA/MituKYgteW3wSC9w7n8sK3Ax7imIMfYILXluLC05LTPtNku
PC9GT05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj65sLfQLCDA/MitIDAy
LTU4OC0wNTEwIMC4t861tSC9xcO7x8+9xyC89iDA1rG4v+QuPC9GT05UPjwvUD4NCjxQPjxG
T05UIGZhY2U9sby4ssO8IHNpemU9Mj6+xrmrwsm3zyDAzCDH0L3Auf3AzCBidWctYmFzaLTU
wMcgyLjIrSC9x7fCIMfiu/O/oSDA28C6ILq4xcbAzCANCrXHvvrAuLjpPEJSPsfVtM+02S48
L0ZPTlQ+PC9QPg0KPFA+PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPrCou+fH1bTPtNkuPC9G
T05UPjwvUD4NCjxQPjxGT05UIGZhY2U9sby4ssO8IHNpemU9Mj5idWctYmFzaLTUsrK0wiBo
dHRwOi8vZnJlZWRvbS5zYXJhbmcubmV0L3ByZXAvbWFpbGluZ2xpc3RzLmh0bWy/oSDA1rTC
IMHWvNK4piC6uLDtILjewM8gteW4rrDUIA0Ktce++r3AtM+02S48L0ZPTlQ+PC9QPg0KPFA+
PEZPTlQgZmFjZT2xvLiyw7wgc2l6ZT0yPrrSx8q/5MfRIMGkuri/tLTZuOkgwaS4uyDBy7zb
x9W0z7TZLjxCUj48L0ZPTlQ+PC9QPg0KPC9CT0RZPg0KPC9IVE1MPg0K




From mrs@windriver.com Tue Nov 28 21:56:36 2000
Received: from unknown-1-11.wrs.com ([147.11.1.11] helo=mail.wrs.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 140xQB-0003P0-00
	for <bug-bash@gnu.org>; Tue, 28 Nov 2000 21:56:35 -0500
Received: from kankakee.wrs.com (kankakee [147.11.37.13])
	by mail.wrs.com (8.9.3/8.9.1) with ESMTP id SAA23862
	for <bug-bash@gnu.org>; Tue, 28 Nov 2000 18:56:08 -0800 (PST)
From: Mike Stump <mrs@windriver.com>
Received: (from mrs@localhost)
	by kankakee.wrs.com (8.9.3+Sun/8.9.0) id SAA19860;
	Tue, 28 Nov 2000 18:56:31 -0800 (PST)
Date: Tue, 28 Nov 2000 18:56:31 -0800 (PST)
Message-Id: <200011290256.SAA19860@kankakee.wrs.com>
To: bug-bash@gnu.org
Subject: [50 character or so descriptive subject here (for reference)]
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7' -DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -I. -I./include -I./lib -I/folk/mrs/packages/bash-2.04/include -g -O2
uname output: SunOS kankakee 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:

I type:

ls /*/*/*ntp*

on my machine, to try and find the ntp programs, and it takes too long, so I
hit ^C, but that doesn't have any immediate effect.  This is wrong, ^C needs
to abort the operation in progress, and give me a new prompt.  It wants to
search automounts I suspect, that go out to tons (hundreds of machines, some
of which aren't powered), and collect all that information, before forking and
running ls.  I attach a gdb to the bash, and see that ^C does transfer control
to a handler.  The only problem is the outer context doesn't check and abort.

Repeat-By:

ls /*/*/*/*/*/*/*/*/*kjshdfkhjsdf*

on a large system.


From nobody@linuxone.co.kr Wed Nov 29 00:09:19 2000
Received: from [210.108.91.129] (helo=linuxone.co.kr)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 140zUc-00070h-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 00:09:18 -0500
Received: by linuxone.co.kr (Postfix, from userid 99)
	id B62923E8C; Wed, 29 Nov 2000 14:08:25 +0900 (KST)
To: bug-bash@gnu.org
From: jjack@linuxone.co.kr
Reply-To: jjack@linuxone.co.kr
MIME-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: 8bit
X-Mailer:  yamail 0.9.1
Subject: If there is '::' in $PATH, current directory(.) included.
Message-Id: <20001129050825.B62923E8C@linuxone.co.kr>
Date: Wed, 29 Nov 2000 14:08:25 +0900 (KST)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Configuration Information [Automatically generated, do not change]:<br>
Machine: i386<br>
OS: linux-gnu<br>
Compiler: gcc<br>
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'<br>
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'<br>
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE<br>
-D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include -O2<br>
-march=i386 -mcpu=i686<br>
uname output: Linux maro 2.4.0-test11-ac4 #6 SMP Mon Nov 27 13:25:04 KST<br>
2000 i686 unknown<br>
Machine Type: i386-redhat-linux-gnu<br>
<br>
Bash Version: 2.04<br>
Patch Level: 11<br>
Release Status: release<br>
<br>
Description:<br>
        If there is '::' in $PATH, or ':' is at the begin of $PATH or at<br>
the end of $PATH,<br>
        current directory (.) is added to PATH LIST.<br>
        We think it is better not including current directory, because it<br>
is a security problem.<br>
<br>
Repeat-By:<br>
Fix:<br>
diff -Nur bash-2.04.orig/findcmd.c bash-2.04.new/findcmd.c<br>
--- bash-2.04.orig/findcmd.c    Tue Nov 30 02:33:31 1999<br>
+++ bash-2.04.new/findcmd.c     Wed Nov 29 13:59:11 2000<br>
@@ -245,13 +245,13 @@<br>
<br>
   if (path == 0)<br>
     return (path);<br>
-<br>
+/*<br>
   if (*path == '\0')<br>
     {<br>
       free (path);<br>
       path = savestring (".");<br>
     }<br>
-<br>
+*/<br>
   return (path);<br>
 }<br>
<br>
@@ -533,6 +533,9 @@<br>
       path = get_next_path_element (path_list, &path_index);<br>
       if (path == 0)<br>
        break;<br>
+<br>
+      if (*path == '\0')<br>
+       continue;<br>
<br>
       /* Side effects: sets dot_found_in_search, possibly sets<br>
         file_to_lose_on. */<br>
<br>


From chet@nike.ins.cwru.edu Wed Nov 29 09:49:47 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1418YM-0002ks-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 09:49:46 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id JAA25446; Wed, 29 Nov 2000 09:49:35 -0500 (EST) (from chet)
Date: Wed, 29 Nov 2000 09:48:56 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: jjack@linuxone.co.kr
Subject: Re: If there is '::' in $PATH, current directory(.) included.
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001129144856.AA25444.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from jjack@linuxone.co.kr of Wed, 29 Nov 2000 14:08:25 +0900 (KST) (id <20001129050825.B62923E8C@linuxone.co.kr>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Stop sending html mail.

>         If there is '::' in $PATH, or ':' is at the begin of $PATH or at<br>
> the end of $PATH,<br>
>         current directory (.) is added to PATH LIST.<br>
>         We think it is better not including current directory, because it<br>
> is a security problem.<br>

Sorry, this will not change.  It's how shells have always behaved, and
what POSIX specifies.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Wed Nov 29 09:51:25 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1418Zw-00033i-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 09:51:24 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id JAA25460; Wed, 29 Nov 2000 09:51:21 -0500 (EST) (from chet)
Date: Wed, 29 Nov 2000 09:50:16 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: tblader@flamcorp.com
Subject: Re: cr: Command not found
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001129145016.AA25453.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from tblader@flamcorp.com of Wed, 29 Nov 2000 06:56:15 -0600 (id <3A24FCEF.CC9AFEEC@flamcorp.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I compiled bash-2.04 on a Solaris 2.51 sparc box yesterday, but on
> 2.7, it does not (did make distclean).  
> Very odd..the only reference I can find in the Makefile to 'cr' is the
> 'ARFLAGS'. 
> Is this some obvious oversight on my part?

Look at item 10 in the NOTES file.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Wed Nov 29 13:25:52 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141BvU-0001k5-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 13:25:52 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id NAA29275; Wed, 29 Nov 2000 13:24:34 -0500 (EST) (from chet)
Date: Wed, 29 Nov 2000 13:23:35 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: scott6459@my-deja.com
Subject: Re: 'shopt -s expand_aliases' problem [resend]
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001129182335.AA29270.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from scott6459@my-deja.com of Fri, 24 Nov 2000 09:40:23 GMT (id <8vld27$nnd$1@nnrp1.deja.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> Machine Type: sparc-sun-solaris2.5.1
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> I'm trying to emulate ksh's exported aliases and I'm having a problem
> with 'shopt -s expand_aliases':  it doesn't seem to stay on between my
> BASH_ENV file and my script.
> 
> Repeat-By:
> 
> For example, given these two files:
> 
> $HOME/my_bash_env:
> echo Welcome to my_bash_env
> echo This is bash $BASH_VERSION
> shopt -s expand_aliases
> shopt expand_aliases
> echo
> 
> ./my_script:
> #!/usr/local/bin/bash
> echo Welcome to my_script
> shopt expand_aliases
> 
> Then
> 
> BASH_ENV=$HOME/my_bash_env ./my_script
> 
> Produces this:
> 
> Welcome to my_bash_env
> This is bash 2.04.0(1)-release
> expand_aliases  on
> 
> Welcome to my_script
> expand_aliases  off
> 
> How did expand_aliases get turned off?  Is it a bash bug?

Yes, an overzealous attempt to initialize a non-interactive shell.  It's
been fixed for the next version.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Wed Nov 29 13:32:18 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141C1b-0001pa-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 13:32:13 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id NAA29544; Wed, 29 Nov 2000 13:32:06 -0500 (EST) (from chet)
Date: Wed, 29 Nov 2000 13:28:25 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: rss@idiom.com
Subject: Re: YAPCQ (Yet Another Programmable Completion Question)
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001129182825.AA29519.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from rss@idiom.com of 23 Nov 2000 21:39:57 GMT (id <8vk2rd$2hol$1@news.idiom.com>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> I'm a ClearCase user, and ClearCase provides many opportunities to do
> cool stuff using programmable completion.  When one is in a ClearCase-
> controlled filsystem, the filenames are "sticky" and there are special
> commands you can use to access a file's entire version history.
> 
> Without getting into excessive detail, here is what I want to do.
> Let's say I have a function called "clearcase_complete_file" that does
> ClearCase-enhanced filename completion.  It's easy enough to bind this
> function to specific ClearCase commands, but what if I want to make it
> into a generalized function that works in any filename context,
> regardless of what command I'm using?
> 
> What I want is some way to hook the default readline-based behavior
> and have it use my function instead.  The other way to win would be to
> bind my special function to a keyboard sequence using .inputrc or some
> comparable mechanism.
> 
> Any ideas?  Thanks, as always.

I'll keep it in mind for a future version.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From chet@nike.ins.cwru.edu Wed Nov 29 14:01:48 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141CUG-0002W7-00
	for <bug-bash@gnu.org>; Wed, 29 Nov 2000 14:01:48 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id OAA29688; Wed, 29 Nov 2000 14:01:31 -0500 (EST) (from chet)
Date: Wed, 29 Nov 2000 13:57:44 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: klausf@Pool.Informatik.RWTH-Aachen.DE
Subject: Re: nested exec<<HERE ambiguity
Cc: chet@po.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001129185744.AA29673.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from klausf@Pool.Informatik.RWTH-Aachen.DE of Thu, 23 Nov 2000 15:03:48 +0100 (MET) (id <200011231403.PAA23332@matlock.informatik.rwth-aachen.de>)
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

> Bash Version: 2.02
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	When bash sources (`.') the file whose contents is given after the
> 	"Repeat-By:" line, it doesn't echo a `1' like the bourne and korn
> 	shells do. I'm not sure which output is correct. If the file is
> 	used as a shell script, there's no visible difference.
> 
> Repeat-By:
> exec<<a
> exec<<b
> echo 2
> b
> echo 1
> a
> echo 0

My current development version of bash and ksh93 both echo

0
2

and exit.  Bash will echo some extra stuff because readline really
wants to echo the input it reads.  I'm surprised that `1' would be
echoed at all, since the second here document essentially overwrites
the first.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


From jkh@rawhide.osd.bsdi.com Thu Nov 30 13:47:30 2000
Received: from rawhide.osd.bsdi.com ([204.216.28.227])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141Yjt-0005l1-00
	for <bug-bash@gnu.org>; Thu, 30 Nov 2000 13:47:25 -0500
Received: (from jkh@localhost)
	by rawhide.osd.bsdi.com (8.11.1/8.11.1) id eAUIlC827281;
	Thu, 30 Nov 2000 10:47:12 -0800 (PST)
	(envelope-from jkh)
Date: Thu, 30 Nov 2000 10:47:12 -0800 (PST)
Message-Id: <200011301847.eAUIlC827281@rawhide.osd.bsdi.com>
From: jkh@freebsd.org
To: bug-bash@gnu.org
Subject: bash dumps core on Alpha when bogus pointer is dereferenced
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

Configuration Information [Automatically generated, do not change]:
Machine: alpha
OS: freebsd4.2
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='alpha' -DCONF_OSTYPE='freebsd4.2' -DCONF_MACHTYPE='alpha--freebsd4.2' -DCONF_VENDOR='' -DSHELL  -DHAVE_CONFIG_H   -I. -I/usr/local/include -I. -I./include -I./lib -I/usr/local/include -O -pipe
uname output: FreeBSD rawhide.osd.bsdi.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Tue Nov 21 03:36:35 PST 2000     jkh@rawhide.osd.bsdi.com:/1/obj/usr/src/sys/GENERIC  alpha
Machine Type: alpha--freebsd4.2

Bash Version: 2.04
Patch Level: 0
Release Status: release

Description:
	One of the shell functions in my .bashrc attempts to iteratively
	set $PATH by walking through a series of prefix directories
	and looking for ${prefix}/bin, then appending that to PATH.  When
	this function is run on the Alpha, bash dumps core at line 303
	of unwind_prot.c (the FASTCOPY) due to "value" being set to garbage.
	Tracing back up the stack, we see that on line 2775 of execute_cmd.c,
	unwind_protect_pointer() is called with "this_shell_function" as
	an argument and that pointer is invalid.  Just below this clause,
	you see this_shell_function set to "var".  If this clause is moved
	above the test for subshell == 0, the error no longer occurs.

Repeat-By:
	Use my unmodified .bashrc on an alpha.  I'll be happy to send it to
	you if you want it.

Fix:
	See description section.


From misiek@pld.org.pl Thu Nov 30 17:11:38 2000
Received: from ikar.t17.ds.pwr.wroc.pl ([156.17.210.253])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 141bvV-0004uP-00
	for <bug-bash@gnu.org>; Thu, 30 Nov 2000 17:11:37 -0500
Received: by ikar.t17.ds.pwr.wroc.pl (Postfix+IPv6, from userid 1002)
	id 4CA63C8006; Thu, 30 Nov 2000 22:09:48 +0100 (CET)
Date: Thu, 30 Nov 2000 22:09:48 +0100
From: Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
To: bug-bash@gnu.org
Subject: [PATCH]: ipv4 and ipv6 support when getaddrinfo() available
Message-ID: <20001130220948.A10935@pld.ORG.PL>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.2.5i
X-URL: http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/
X-Operating-System: Linux dark 4.0.20 #119 Tue Jan 16 12:21:53 MET 2001 i986 pld
X-Team: Polished Linux Distribution Team Member
X-PLD-URL: http://www.pld.org.pl/
Sender: bug-bash-admin@gnu.org
Errors-To: bug-bash-admin@gnu.org
X-BeenThere: bug-bash@gnu.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:bug-bash-request@gnu.org?subject=help>
List-Post: <mailto:bug-bash@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=subscribe>
List-Id: Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bash>,
	<mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bash/>

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Simple patch to add v6 support for bash ie:

[misiek@arm misiek]$ cat < /dev/tcp/::1/22
SSH-1.99-OpenSSH_2.3.0p1

bye,
-- 
Arkadiusz Mi¶kiewicz, AM2-6BONE    [ PLD GNU/Linux IPv6 ]
http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/   [ enabled ]

--jRHKVT23PllUwdXP
Content-Type: application/x-gzip
Content-Disposition: attachment; filename="bash-2.04-ipv6-20003011.patch.gz"
Content-Transfer-Encoding: base64

H4sICEHQJjoAA2Jhc2gtMi4wNC1pcHY2LTIwMDAzMDExLnBhdGNoAJ1W+2/iOBD+mfwVsz1d
NymvQKEP2O41R7MtupZWwK500klRCE6xCDaKHbbtqv/7ju3wXHrVXaXG8Yxn5vM3j9CG7sPi
BEQ2n/NUQsxTGIViAvWK26hYbehMSDTVYvIUzuYJaaEwCiV8guqYLKoymldbrVr1zLXaVrvg
pdNwTDPxAndUTCn5TqMX+DSjgpLp5TwZV+7715WH288leLi9guve1+otZdmTNaZxDOUs7eno
ZR2dp4/ViLOYPlYmFcrWmk2pVS6X37YpDCcZ9PgCjl2o11vHtVb9FOqu61rFYnG/wx2TZrNV
bxqTy0so18/rpRMoquUMLi8tsOC3jI1JDDfeNz+49oc394Phn3/3vDsflcUdpXd11e/2vtxb
xW27bs8fBt7wvrfHYf+2e9cdvsNQlpJ9FBnxmxwZ9X8jaa9N0225Z2uWGqfHpVMomkWxVCgI
IhPKyCiLQb3yKEwICJlGk1QtJE25fpF8bJYE/tF26j1LQEaPRIZSppCxcIamz0LhgSyhMypB
0hkRIF/Qd25HHymT6DabS5iR2YwvCEj5rI3R1YQLOTI7hCWDUHKGlmUdcT5KpwrmAuE6VvEX
mXIQjscpZTF3VMrGLIFIdYrQrZJfL85YJClnwgKvE3Ru/M5fwY3vXfn9gZ3QEeJLKhPnzczi
kaqYVBEdnxNWiTZSsavak+HdI3uyfLIvy+/YNU5bjcY6082Gagd8mm4gT0g5Q0YlIPWMt7Ga
CcML6l6g8dvNQGP4gErMxRjs7Z5wtvyus2U7a/cKS612WqohmlrtvHTS0HgASCKIWgFSIjP0
4aLRK4LRdlA9+gUOHFVVSgVWG410SAuCnA5blU0JyyBdlEA+zx3jGnMfpnBklEdK284VyhzP
4faHVTRb0dZU7GcCVPFnkYRlecEEbQR6TUn+xAvknh6RY71R/1jjWJ32YX7eRZT0hfDY1gLH
0Qf1eyWkQRzOaPIMF+B9Cb72Bg9+Z1sveDRF3ARP2LjCxQV8lB8d+AMG91jFg2Hf9+6gZXZX
133vTtsrRGiy0R5bjC3BHaprGESYA9tYXYDvdYOB3//W7fiO0oEhLecRCyBMAj0o7IPfRQtl
izChY+2bRuTARDFuNxJeruWS1814/x4ATASFHefNlPHvDN2r7TvuVffbeDskQadKPfXDCMqf
kVuG1bwMD6v4iMtWpxTzmMflYZOo0sp4mZi1ZJ5yySOeOA5+k11n6dC43IlZ0MXKmcSPLkHc
Bd0eSvwjV+JcXVFgoByoK2tdnBKyyusyhYUNLuxyLRe9bt4LAzKCNW2LNWrlZ3uXELa8QWE/
9CXGKOGC2GIVffNCOvTWtWD9t7qcfZBjOljnE/a5/j9X3mtjVKOUhNPNelGDCLG+OYdW84Ay
TRKuYXtDrFKk5AF+/AVlWpUx/PipOSom6icdDp/yavKsZtVRpIaSlWcoyDs279ZDjOKojsRk
6MnaPNe/etzz/Hu+SxZstYThBPJLvjtpl3bG06v1E2BDruuTCgAA

--jRHKVT23PllUwdXP--


