From David.Keegan@marconi.com Fri Dec 01 07:23:28 2000
Received: from mailgate.pit.comms.marconi.com ([169.144.68.6])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141pDs-0002mC-00
	for <bug-bash@gnu.org>; Fri, 01 Dec 2000 07:23:28 -0500
Received: from mailman.pit.comms.marconi.com (mailman.pit.comms.marconi.com [169.144.2.12])
	by mailgate.pit.comms.marconi.com (8.9.3/8.9.3) with ESMTP id HAA26487
	for <bug-bash@gnu.org>; Fri, 1 Dec 2000 07:23:25 -0500 (EST)
Received: from stl-server-01.pit.comms.marconi.com (stl-server-01.pit.comms.marconi.com [169.144.36.27])
	by mailman.pit.comms.marconi.com (8.9.3/8.9.3) with ESMTP id HAA25373
	for <bug-bash@gnu.org>; Fri, 1 Dec 2000 07:23:27 -0500 (EST)
Received: by stl-server-01.pit.comms.marconi.com with Internet Mail Service (5.5.2650.21)
	id <W83N695N>; Fri, 1 Dec 2000 07:23:26 -0500
Message-ID: <9523A991F7AED311A8B900508B6701F49ED67B@dl-msgusr-01.eu.fore.com>
From: "Keegan, David" <David.Keegan@marconi.com>
To: bug-bash@gnu.org
Subject: Bash hangs waiting for children (already dead)?
Date: Fri, 1 Dec 2000 07:19:45 -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.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/usr/local/include -g -O2
uname output: SunOS dlsparc9 5.7 Generic_106541-11 sun4u sparc
SUNW,Ultra-250
Machine Type: sparc-sun-solaris2.7

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

Description:
   Bash is running a fairly deeply nested set of shell functions in a
   test set-up. When stdout and stderr of the top level shell function
   are to the terminal, all is well. When stderr and stdout of the top
   level function are piped into tee as follows

      $ TopLevelShellFunction 2>&1 | tee test.log

   bash hangs after up to an hour or so, but in a different location
   each time. Here is the process tree with what each instance of bash
   is doing according to truss. The last instance of bash is in a loop
   constantly repeating the call to waitid().

   28264 /usr/local/bin/bash -i # Interactive bash.
   waitid(P_ALL, 0, 0xFFBEB728, WEXITED|WTRAPPED|WSTOPPED) (sleeping...)

     12715 tee -a /part2/dkeegan/sof/1/../HaTestResults/10/hdlsparc9.log
     read(0, 0x00021190, 5120)	(sleeping...)


       12712 /usr/local/bin/bash -i # Bash running HadrTest piped into tee.
       read(4, 0xFFBE3F78, 128)	(sleeping...)

         26440 /usr/local/bin/bash -i
         read(4, 0xFFBE3F78, 128)	(sleeping...)

           26514 /usr/local/bin/bash -i In a tight loop.
           waitid(P_ALL, 0, 0xFFBE3BF8, WEXITED|WTRAPPED)	Err#10
ECHILD

Repeat-By:
   I can't give any code that causes the problem as it happens at a
   different stage in the test process each time.


Any suggestions as to what might be causing this gratefully received.

Regards,
David Keegan.


From chet@nike.ins.cwru.edu Fri Dec 01 10:55:38 2000
Received: from nike.ins.cwru.edu ([129.22.8.219])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 141sXB-00010B-00
	for <bug-bash@gnu.org>; Fri, 01 Dec 2000 10:55:38 -0500
Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi)
	id KAA55492; Fri, 1 Dec 2000 10:55:35 -0500 (EST) (from chet)
Date: Fri, 1 Dec 2000 10:55:03 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: David.Keegan@marconi.com
Subject: Re: Bash hangs waiting for children (already dead)?
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001201155503.AA55489.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 David.Keegan@marconi.com of Fri, 1 Dec 2000 07:19:45 -0500 (id <9523A991F7AED311A8B900508B6701F49ED67B@dl-msgusr-01.eu.fore.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.7
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
>    Bash is running a fairly deeply nested set of shell functions in a
>    test set-up. When stdout and stderr of the top level shell function
>    are to the terminal, all is well. When stderr and stdout of the top
>    level function are piped into tee as follows
> 
>       $ TopLevelShellFunction 2>&1 | tee test.log
> 
>    bash hangs after up to an hour or so, but in a different location
>    each time. Here is the process tree with what each instance of bash
>    is doing according to truss. The last instance of bash is in a loop
>    constantly repeating the call to waitid().

I believe that I have already fixed this for the next release (currently
in alpha test).

-- 
``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 WatchDog@greatparents.com Sat Dec 02 09:43:25 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 142Dsr-0003Kn-00
	for <bug-bash@prep.ai.mit.edu>; Sat, 02 Dec 2000 09:43:25 -0500
Received: from mtiwmhc26.worldnet.att.net ([204.127.131.51])
	by chx400.switch.ch with esmtp (Exim 3.15 #3)
	id 142Dsp-000424-00
	for gnu-bash-bug@moderators.isc.org; Sat, 02 Dec 2000 15:43:23 +0100
Received: from bgtnsc07-news.ops.worldnet.att.net ([135.173.83.57])
          by mtiwmhc26.worldnet.att.net
          (InterMail vM.4.01.03.10 201-229-121-110) with ESMTP
          id <20001202144322.KXUZ20084.mtiwmhc26.worldnet.att.net@bgtnsc07-news.ops.worldnet.att.net>
          for <gnu-bash-bug@moderators.isc.org>;
          Sat, 2 Dec 2000 14:43:22 +0000
Received: by bgtnsc07-news.ops.worldnet.att.net (8.8.8+Sun/SMI-SVR4)
	id OAA14716; Sat, 2 Dec 2000 14:43:21 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "WatchDog" <WatchDog@GreatParents.com>
Newsgroups: gnu.bash.bug,gnu.chess								
Subject: !! THEY'RE TORTURING CHILDREN !! PLEASE HELP!!
Lines: 61								
X-Newsreader: Custom011660 
Message-ID: <dU7W5.12321$0r2.331226@bgtnsc07-news.ops.worldnet.att.net>
Date: Sat, 02 Dec 2000 14:43:21 GMT
NNTP-Posting-Host: 12.77.231.82
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc07-news.ops.worldnet.att.net 975768201 12.77.231.82 (Sat, 02 Dec 2000 14:43:21 GMT)
NNTP-Posting-Date: Sat, 02 Dec 2000 14:43:21 GMT
Organization: AT&T Worldnet
X-BadReturnPath: newsadm@bgtnsc07-news.worldnet.att.net rewritten as WatchDog@greatparents.com
  using "From" header
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/>

"Mommy whats a SCAG?"

See www.GreatParents.com for the COMPLETE TEXT.

Uses of Internet Pornography for Mass Extortion.

	How the extreme left and right in America are 
	destroying you and your children!

!!PLEASE copy this to your friends!!

Also at alt.privacy.anon-server, alt.privacy please post 
additional information there.


In the "brick and mortar" days of extortion the extortionist was 
met with great challenge attempting to discover those individuals 
or families in a community who were involved in compromising 
behavior. With the advent of listening devices this process 
became somewhat easier but the extortionist was still left 
looking for a needle in a haystack when deciding which 
individuals to target in a community. 

Then, along came the Internet with widely available 
pornography providing economic boom times for the 
extortionist. Now instead of going from home to home in a 'hit-
and-miss' fashion to find victims they now simply sit on the 
Internet and watch the traffic go by. When they see someone 
downloading compromising material they can target that 
individual with the 'honey-pot' of their desire. 

The ramifications of this new 'e-extortion' are tremendous and in 
my view threaten our very culture. In the past the logistic 
difficulty of finding victims acted as a natural governor to the 
number of people who could be enslaved by acting on their 
desires. But, if this natural restrictive barrier were ever to be 
broken it would create secret sub-societies containing vast 
numbers of compromised individuals, who, driven by guilt and 
fear of exposure, would obey orders in a zombie-like fashion. 
Guided by the heavy hand of the new "super-extortionist" they 
could secretly destroy lives, take over businesses, and 
manipulate whole political parties. This new organized crime 
would penetrate so deep into our society that no level of 
government, local, state, or national would be able to do 
anything about it without the support of a massive popular 
movement.

I believe that this process is occurring right under our noses 
today. The degree to which our very society is threatened is 
unclear since no one is talking. A terrible irony is that the some 
of the people who loudly proclaim themselves the guardians of 
our moral culture and those who declare themselves the 
guardians of children are the very people who use, or benefit 
from, these tactics most. 

-------------------------------------------------------------------
MODERATOR - THIS IS NOT SPAM!!! This is a public service for 
your readers. If they own a computer it is on-topic. It IS-NOT
for commercial use!!! This is what the Internet was supposed to
do for us - please let it through!
-------------------------------------------------------------------


From gooday@okongcomp.com Sat Dec 02 11:43:14 2000
Received: from [211.110.63.96] (helo=z2r0z8)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 142Fkn-00077p-00
	for <bug-bash@gnu.org>; Sat, 02 Dec 2000 11:43:13 -0500
Date: Sun, 03 Dec 2000 01:39:38 +0900
From: "±è¿©¼·"<gooday@okongcomp.com>
To: bug-bash@gnu.org
Subject: ¼ÒÇüÁø°øÆßÇª ¹× ¼ÒÇüÄÞÇª·¹»þ Àü¹® ¾÷Ã¼ [¿À°øÄÞÇª]ÀÔ´Ï´Ù.
X-AD2000-Serial: 1038
X-AD2000-Register: "±è¿©¼·" <gooday@okongcomp.com>
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="---=AD_2000_BOUNDARY_00c45301b73700ebc3014a4700cf1f"
Message-Id: <E142Fkn-00077p-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/>

-----=AD_2000_BOUNDARY_00c45301b73700ebc3014a4700cf1f
Content-Type: text/html
Content-Transfer-Encoding: base64

PEhUTUw+DQo8SEVBRD4NCjxNRVRBIE5BTUU9IkdFTkVSQVRPUiIgQ29udGVudD0iTWljcm9z
b2Z0IERIVE1MIEVkaXRpbmcgQ29udHJvbCI+DQo8VElUTEU+PC9USVRMRT4NCjwvSEVBRD4N
CjxCT0RZPg0KPFA+IDwvUD4NCjxQIGFsaWduPWNlbnRlcj5bv8Cw+Mb7x6pdtMIgvNLH/MTe
x6q3ubv+ILnXILzSx/zB+LD4xt/HqsDHILTruO2758DUtM+02S48L1A+DQo8UCBhbGlnbj1j
ZW50ZXI+PEEgaHJlZj0iaHR0cDovL3d3dy5va29uZ2NvbXAuY29tIj53d3cub2tvbmdjb21w
LmNvbTwvQT48L1A+DQo8UCBhbGlnbj1jZW50ZXI+PEEgaHJlZj0iaHR0cDovL3d3dy5va29u
Z2NvbXAuY29tIj48SU1HIGFsdD0iIiBoc3BhY2U9MCANCnNyYz0iY2lkOjAwZjU2YjAyMjUw
ODAxMjZiNzAxOWNkYzAxMDJlYSIgYWxpZ249YWJzTWlkZGxlIA0KYm9yZGVyPTA+PC9BPjwv
UD4NCjxQIGFsaWduPWNlbnRlcj48QSBocmVmPSJodHRwOi8vd3d3Lm9rb25nY29tcC5jb20i
Pnd3dy5va29uZ2NvbXAuY29tIDwvQT48L1A+DQo8UCBhbGlnbj1jZW50ZXI+PEZPTlQgc2l6
ZT0yPiZuYnNwO7HXtOu3ziDIuL3Fx8+/qSDB1r3DuOkgtNnAvbrOxc0guN7Az8DMILChwfYg
vsq9wLTPtNkuPC9GT05UPjwvUD4NCjxQIGFsaWduPWNlbnRlcj48Rk9OVCBzaXplPTI+sKi7
5yDH1bTPtNk8L0ZPTlQ+PC9QPg0KPC9CT0RZPg0KPC9IVE1MPg0K

-----=AD_2000_BOUNDARY_00c45301b73700ebc3014a4700cf1f
Content-Type: image/gif;name="sub1_img_1.gif"
Content-Transfer-Encoding: base64
Content-ID: <00f56b0225080126b7019cdc0102ea>

R0lGODlhfABhAPf/AAAAAMDAwM/soAD9/+BTVF8nKOKJjfqtr/HQ1v3y9Pja4OPG0Pvi69K3wuvT
3cesuObM2Ne/yu3b5MC+v7uir5WBjFhNU/Pd6ezV5MvIytrG1KyZp6GQnf3t+fjo9PPh7/70/Hlt
d8i2xWxfauXT4+DP3+zc6wYCBurW6j86PxIREv76/tnX2a2rrbSztIR6hc690AoGC19XYTQwNdnK
3beovL+wxO3i8ZOJmObb6+LW6SIgJCopK0hDTs7F2KmiusC6z/Xz+xcWG/r5/puXrwICBrCwx/T0
9XN1j4yOqEtOZGVpgnuBoVZddeLm9QMFCyYtP5aiv87V5s7R1jA7S9jg7Onv+BEcKwMLFBpPirHE
2SZwtAcTHh0nMEGKyVyf2jRGVQQKDfb7/D99fxr6/ib2+j7m6ErJyjVlZgL+/g7+/jLy8gIGBkij
oyY2Nvr+/pO0pg4SEHmkigYKBnKSaDxMN0tcRCYtHxwdG1xrSLPOjJ20esbimml3UzY6Kv7++r66
n9jQtv779h4WCvHh3vzt69YrJTkeHf3U05EsLBIODv76+v7+/vr6+urq6t/f3w4ODgoKCgYGBgIC
AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAB8AGEA
QAj/AAMIHEiwoMGDCBMqXMiwocOHEAs+qgIEAgIFKCQs2NACwgUJFGo8aADBxoaRFDZQiOCgJQkH
EGAuaAlBAoMIFERoiABDAw0tPqpIGWrlSBCEb44oDdCo0UCnR6pMmXI0otUAR6a4sHEDBQoTJrya
+EDjB5GzRGqQKEHCqw4Ma0vQmEtDLg2fEPKyhcuWxFoTFEI8CvBGjBUpGkR4cNBgwQMRFDjY0FDD
BgwOG34w4VCDCY4fLypQgPEg5kyQNWAscOJEKBEvX75oeROxEYsWHEWOjLAAQwkcFlJQ6cKFy5Ud
V7gIwcKc+RUkTLxAR0KdOpMNNmrg8LwhQgQORmqI/7CBo0KIEKKTKBmhIwDoDx08AHmR2ocPJktC
IFmCA0iIHkoAiIQNL+yXRRZbbIGgFwx+scEEEwzWkAQKeLDCCiB0AAIICWwIwgos8HBFE0QY8YMR
KHJAgCEstujiiywmYsgIMihho409yHDeCDyeV0FpDDBQSAIBMGLkQBcKosAiAh3xQGqJmUVBAw9Q
8EAJItRQwQwpMOGDI4w8xIIFcczAgQMefODBmmzigMcOHLwQRhFYKGHBIHj0YMFyIzjyhhVV+KCF
iWYpoUgMMUjCwwgVYGZej432sAMekKQwBSN/FCKQGE78gAMOWM7w5gwyvNCCCC+M8AIHQPiAIhE4
vP8QAo1K4ABDEptV0KgIJXjwR0FxrLFGHIrEYawbYwwwhiKQkGFGHCk0+ywkwkKywxkDdJHCHNhC
IgS2Y6AhgwtwlGsHGmOke8a6Z7SR7hhu9ADJGOyesYazyr4QgJo3CKVDhiB4AMEChazZQQdALLFE
DRse/IFXftlgwwU3/CBaDUCUIIWuGbjQgKYGTRDsAGp0EYIjGWSAxwAstzzAGdSuAYkLQlChbr1l
DBDHCo+EEEcbyho7wLAzbOBAHGSUAQYYZqThRsyQCKVFFUN0kAK2wg5rbxwv8xBCsstCgnXLkGBw
AQZfKzsDED2AHYIDDDyAXga/DhTCGWnk7TLLaQz/7ccLbaRxRiSQQBIJGgOYMQMNMkyS+LvplrEG
GzI0MUIIocXwMh4NaLAADW1HQrjhkewQcyQVvHBSAxKIQKa1KShiLyRdd8ACGGqYUTgkinRRBhmQ
vNAFFSlQAEENVAghCdgyRNBCBUm44EjdDK1gwSQAQGJHH3t0T0ceeAAAAA86oECDD0AAkd0PSBSB
Rx/wxy9//H4A0IUSYFChv/5QAPD+/ADsQ/0s4IELxEQBGMDABvwXQADWbwcj8IyszmMBKihhCdCJ
FQnClBBHQAIAd+CDAEZIwhLSQXwteEMjjuAIRzyCBTMAwB5KSEMaotAFLmhBC2C1AxnW8IcCEB8Q
/8YDBEIxQXzdS6ISlWgHAKQgCUkgwg+maIRWaSAxNpgAC5yikBSA0A9gDKMYxSg+hMgAAJPIgx5+
yAc6KCJ7EjJI+OqwRiCOsA8AEAwLUjYBHOKwBfg5ox9IuAcAPIEKGMTBH3WoQxdkwBFH4OBVJknJ
SlpFkpbM5ECqkAQg2MQBGHCAd0gAgQiohDdAoI0mV8nKhxyhBkHwwA3YtKYPXMABOXBCCXzQgAhg
4ANqSpMHGKAACXzkAiXQAAo0QAEKLCAvC3imNGcSSgw0QAQxgYAGMlADDZggAp1rgA1K4AANvCSZ
GHBMShqwFrPl4C4RyMADHrCAlSxgIlJwgiZBJP+CG4BFAl8xgQ5MoAGznCUJNgDmmhIITIDmAGIP
hYtfJlqCilqUBDfwz3ZwQATrMIEJP9iADJDQqwZUoAFz0UCVREIBImzgpc3cAAfKYwMaWEEMQdAB
DDQDGy+g4UAJWpAXVMmQQNEgfSgyURQOSoQoAAEHPQRAEZ7AHON0AQpQSIFWC8DVRHD1q2AN6yFC
4IF0rkAghRiSIARx1gD8agUH68ANcnADHcjFCA1oAAWM4AMa1ECKRohCEviqhSgwQUFb+ILEWqDF
IwgEkwhpxCMm4IAMaehgtUwTCFoQhxjsoAfo4QBjWUCII1AvACv4wx8EsQgQMAARDNDBXWCgvvX/
mSUJMuXAFHGFnxBwYCUIMAFmIzCBKpAAfbfdTxPyp78U9EBPpSpPqkYAK9DIAAeONUiwhmWsOOAh
BW6DRBnKUKwu5I5S1eIB3qhQODOoIQ7X0pkKOFCYILTQZ5BAQ73aQDgebIBrLRPW0JgnhSnUYFBR
iMINhmCFD5SgBugzEQd0m4QmQOGqFmyCwjCIhBqQZT8ieECqKmAEGDigEJA1CCNwALYXOOACNIjT
BrxpAhUISwUb2EEIWoADDrBADGK42gAgoYVyyUEOdBgDHZYsBzdgaw5LXnL37oCtvbFsDDhYBAM6
IJALeWiYl42rD34ggYMlQEMN6wAJbKDNKLzg/wVE8AECSSBiG0BSko9ww3jbEAc0rGFZXTiDGtAQ
AvEOgAwkQxzLZHa1rDna0XyOA++6S2ljccAFP2NXF3CwXUUMc00bUu8AFAECR+BB0GvomgvAUK91
KUJ2o2YACeKLBjWcIQ4WSNYA0oCHB0yACCGYgiBSjBBGaOAsSNCwElIABiXIgEdIwMEGcOCG5oQh
DE+ganOeUISpYkE5O4CCnlSFmRo0AAYwQC4RkrCfJVABClc4TgpwkJKULKADEKjgDCygGAZc4ANT
KJEWzoduGIggrzXYAMZKQKXUfaoC+flBDSggAWIT5AUA6AMJ9SC+jmt8hHrAnh9ziJsXRBWESf/s
A/Y+LgA8jgAICZeiQXs4QzveEQAjCFKQDhiBEIiP5XgEQAnFR4UmhEBURbgCGJbAhCSMIAVKSIIP
SuCIhXix4+Ib5AgLifUyGgTjeCjhHvLgBzvQoYR4TEELHcGCKfBRfDYnIR4tgJuZSreHdFBiHQXA
hyWK7y56nXBaSO5IMLXyIUZ6g2oXb/HDM4UFE2Ck5CfvSBZAshGNdzxBHOGEgEOn6VEwwlCqUBXN
m/70BQmCFTzXzGYa/AEOQEEEDh6SZj6gJ7CaAPqAMCjea0ELU3jETTOP+tMfwQhBAEEwx6OBEtxy
Ad5pgEDRFxkoPVMmeck+TMC5m5jQpCUtkYD/BLS5AAUQAgZ7lUKggHA+LZAGOyj6gfp9sB3I4CCp
uQTU1BzfCJRNoK5s8VAZQVA/MGE4EEU+4BcQgwIYkBEBBVAYYEy2JH4XUIEV6GAZowEc8AAR8AI9
YDkbAAMN0AIpkRaWUQIQoAAfsBZzYREYUBckoAM38AFXdFwwYAOPAQM1sIELsFNaMBST9Ae2MQEf
YAIPFRZhcQNlgRZJUANfgQI5ABYCZVF90RYURVEVRRd1UQOgtR1vRh3lRgNtcQMw0FR09Sk18AM6
SAM68AMQAAMbIAJAcAE+IFisowOkBAPhIRoNsAFZ0FNbEAW18QgZsCZzBYVtQRYbcBYVsCdC/8AD
kNgFx9EDphInFUBvDqAmJhBNDhAWJCABGJADfpEDMCADChMCHTUCHPZXI4AEOsAIwJYDG2IES/AD
6RNjnvFRJxICTWAj9NEbGPAAY8AgDKIgCJIgSRAFWoB4LDBF06YwTdCL+AMGPbA/UKAC3ZZt3YYF
KiAE3igEKrADPMAlAGI50PZ5TaeLJjAEHhBLdPUB5SRYNQABDABsEgBXP1CLaegDIZACI9CLSAAD
TGAjzbYwMmABSnCMXrAFPZUEjJUyVccQiyABG3IhQxBLa2IFNzBXH9AAhwAAWHBVS9Ns0SgDiXCS
KJmSKnmSBcCSBTADMzACKFZ6gpAAHZIAaf+VKQwQADhZCIjwkz3JQR3wFWmCAg/AAQ2QIb6xU2kB
GToyBRH5EJKVAfDhIWmGWSAgAjzQAzXQAbGkkQiACAdwAAZgAARwlisCI4ZAAHtlULxFHfmxABJA
AyFmA7wnWKsicd2kABUgA1MyT/PUGA5ACOdDAjBWA6khAQ0wUznxAkqABDsWRxDxBhIwARhwMBlS
S7PUJveTjsm2XFilBJhTARPXTAcXASnIAAmgWm/ACK1pJCtwkVFhBOwWjQECXaHxW86nAK5CW0ZA
BEwQAksQICkwAzlyOZgTK282AlCABHHiIyFAb0RCEG9gAW3QarfGPA8QB1WmBm2ABzAQM3H/8AIn
0AaIljgm8y0DMAdTkhcSQAiFkGvp4mhnkC5g8AJC4DJrwC1/pixhQImpE4f0lBcJEAEWIAMw4JWd
8gI8EJKU+Ft2qQVFZFisghk6IiuNuAEf0FYDsV1xMBB/8ALJUp+0cwY78AGKUC0xowiSICyKMAR1
ADbcoixoYAeAEAiBQAjwmQJmEDRx0AWphgYZMASK8DhjcJ32AjYp0BgNUAJBkia3xAAasAEQUDAe
MASEYAExiRlWolRNlQQv4FcKRwSygoMUYBI/YAUFMQP2YgbsEi5uwwFA2jK64wJQswExUGUkQwV1
wJ3rOQdmd2R7UAfo8i49CjnwQgen9qdz/9CoLbYICvAhGAICqLUYFxAfHoCpDTACImACFbUTIiAC
EaABl1EDo8o4M4ADNyABJiACFVAivYIQE4AsaPACGTBh8SQDfiYsZyAELUAtZuCrO0AF2MkubuAI
E8BqxdouM8ACcNAFYJAuaDAHbsAGa/As8IMGfTABR8ACL5ACkBgcbTAsL9MDIoAsiLoD36IGihBK
dBktpCICI5AsbfA2jLEq3ZRdWOECM+CnwxI4ShMHIyCnakAGZ9CjSEoGMoMDkXAFXcA7iWMskqMI
L4ADu3poa5AzklOvjwAJuUMs2MJewrIzqMUIGCJqpAYC6rUGRXoGPCCiQQNr15lqihBM6v9pBicQ
AtGqLCnwAAzQApjxAISweROgnDwANn8jKy/gAiXQA2hgBueZO2eABhbgA15kZYsWPNEKOUYqrYpw
pOxiBsIitjJTQB1wZiDApkOzBmqQBi7aNSuwCCOABufJN2TQBS/rO2XQBRYQCWUwaGBjARXwAw+A
Ay3wCFzkEH9QJagSCUi6Lm3QBTLQKi/ABvCCRpOQuWiABimAGTagEzAAXmAwAm+piqcYWhRgAZs7
ubS5H0igEpLhGBwwAzyAB2MABjigJiKwA/pVL2AwAzUwEyRAA0+iARWABESALG4wAjJlq1bxCCvg
AxUwAjOwHFgQA1egBEwgWB+lMO02Bvj/Y2FYdWFdUL7xdr5CYBzxxgXMwW0x0I1CII7GaQEHKgP2
e5D0uwQ2ECRAEI0bYEw9Nys7oAjxS47QZb+qAoeNorQhUCoy0ANIgFsXoBCMMAVodHY2pwcfxAOf
YRkYYAIX0AIAoHVxh0c9wFsfRR1KMMJxd3MpMCRn628SIMIkbHN4pHQp0ASyIgMzoARNEMFQ1ITT
iRAhCgB5QEJ88EEdV3MCwHUkJ3k84ENAJEIkJD4cEAIWsAEmcBc8/EUYLAB0AEZfjEc7sBNXBAO8
oQFw18J4xAMpgAVQ0ARNhxY/UFMq5QOJmxB/MAUfhD1+kEQnJD6TMAJEVRCMcHWDQAd7/zdCfVc/
KDR5OhTFGddA8uPIJYCHcVECMcTEcSc+J2IZPnBFD/BSNoBDE2B4CXHIUtzCXkcQRVwHJQQ+4kNH
JHRCKWDIf8AIa7x1eid3k0B3kOwCPYAH3agCLLx1APCNeCAEFbCIU7RILVB4hawQewwh1nzN2Awh
1OwmXYd1kCADUYkQLSDJ3dx1L1A3R2IkKNNILoBxWLcDcBDNkucCExB8kVR8+Hx4QuhCbTcVU8EC
j+AIeZzPBF3QBt0QjgAESfCDbHEDLkBvDyAxVTTQB13REOEELOACGnATMOAVQEAELVACJnCUprqY
ylhFVVAFNyUGxGfR+GwFTiAFHoAA9P9IAhNQAmQBBBrQh9nxGNoRhxFQURZRTAiAAA5wXOuWjETw
e1Og0kA2BC3t0g5xBE4wAd0EAZjBEiXQKv6UAekGGVUShytxF9mnfaQafaJ6fS0RSnmBARYRAScC
BCdiBa75Bo6g0k4wKBMABFXAAlpwFFbgArxnFigyBUZQBcV3BBo6Fv+GWWviANlRGd6kJhHQTWaD
Ag4QTdGkVyPhAAqQ2SyhAQOTTTDhAKTxABogSlZSJYD5TCLwAwdnH0BghCSgAEFCAohhl+g2MDBw
XByhBfrUSrbhA/40FmvCAGvCcFSSEjZQPhcAwtD9b8Bk3PExF56NfQugARggAiohmIz/EZgksCYS
UAKVPRIYYE6tI4c32EycoQH2oQEbiW6QoRIqQQEnEsp+Ms0QkRU4ZIQ6kAMAjgJt4QOwAkWfwYZV
iIefWhcoCAEJhAJnE0qgZALiFySFoIgcUJv36QM2AMJ1QQMDQ6olcN6lRALvJOAs4RjXBAGf9gGs
WgI6WBlpGFKHraYRsQL+N1cm4E8fPBZLeBY44IQMCIUm4BdUuBZGbhdZKNpX9KkRYAOXQ95VkhI/
4AMSMKVEYAMUgANNoBiIOWZLBUU/IFg/QLwkkI8cUNmTEQE+YG4MsAgrwABIABtf4AVaENVPQYj+
BIVFKIU/vm5OaIRgUYSiiIeYbIUV/yVRmYyCbGECpRjBuVIg1PEDwUgBwSVQHrBmfOUDciiGPsAT
KCKqnj4eNQUBcpgEGOSYQJUgsLGMDvEGhPgBM4gB//1QZNFSZ2GJJzG9pfIAJiBLbu18RgjgUVjk
bGEXdUGGqvJRZMph9FFhTEACAdACI0ADN8DpIYAd4rFRn/Kb+zGwLL4hOYABSUDnC3kgCHKMW4Dn
b8AC/VTcabKRHlAWcWIBxIEFVyAEXYAcXSAE7+tZHIYD80QBurKBmeipNfgB/KgfTAArTIAEqvgD
FYYEKOAeL2ACGVIDSGCLPgADkk4dRAADSECQTYADkEEBL7AgrJ4gDOkFUyAGb6Dfkf81WTsEpjRy
kDySAld1YclRHNlGVcYBBfqjYR71UUZ/9EfPGSaeA2PmjEfpmE1Q8RsQAh+QIRPwAjbQ8TTwAvcr
x0CABM9lIwMCjequ7l5ABDnkAiyA52KAVMD58A9fHdbhdEIgPlNFJ1UVvz0Pjt44CIdwCGFVAAeq
ihsPAoWgAAPBJALBjmtChz5wAQpwAZ6ShpaxH8/JBDsl6dGYjz686l4QBQ9gygF9BJiH0DogS3bF
gnNhH/ZxAxTwkd6mvuIGID3QVSvpVS0Z+Fw1Vpl6AWHyB6+FCAmgAAqQAIxQCDsZAIKgWgMxBM7f
AR/gBLaEAjqAh81nhB4AAjmgVE7/dZSNFRHHf2YXMv5WuSFZOglcAAafF8SyIiMwcvsqaQHP1QPO
VQELUNTw2Va/f1aYAhABFiUohIgBokIKDiQIECBBhAgkJP5IIoIBhAgigNTYIKJCCihJWDBqWNLk
SZNHWFwAsWIFCJgdOsRckWGGkh82gOyEYYCAIaBBhQ4NSgAHEyRLlDZpouQFkSRJmyoB00NGBQoP
IkhQgGCBggSLxK4oyWjRAhE0METYsOGBiLdaRVDoAebFhCMo9aI8MmWCgw4JPMyU2cHDYRAudkDh
cEEQI5KMyK74A4KgAkQHNPskQMDAARg2RNf4QQRqEtQcOFR4ESLEiwobIHz4gELH/xQYCowwQY2j
wggZFiyk6GFBRogKqjm0rSCDw4MKFpq8SBJiwyOSe/cycjQBQ2HDgj8cHsyBC5YnANiEmaQIDw8L
HBo00CBBAgOGJiMPAWHYgxMdfNiJohBGcO0FHIiowQgbYNAABogcSKCFEGDASASOVsMBtSSgYgIp
3nCwYIQRLEAChxEqqOC1CBrRTq8/ugOMMP/GOyyBCsLgIYQMWMhAiiqqkMIIIph4QSnXXoNNOQqa
jFAB/BbJboU3qnzDiiq0iII3pJYYgYIGHFigtQ1qgGEnI6LYEgmplHCziSVwwKGHHnwgIrkmYRNh
CJQyGGEGHgKFb4QxBmhjBEI22P8BEkZTmOADPNYwY4cKurhCkhgkYeOKS89QAwwW/mDkDUZEZYGD
FyBZY9U12thBCRle4GEMWsdAI5I2zCi0jRQ4iAABQsISZIggrPAAghaiSKLLJmTYoQgVlKhBBA18
+AEJqnpQYonlUF3RuuckCOKkONZQg9VV4yh0jBBSaGOAMtogY4AxRlB1jThkoEINNc4wY4AzduDh
jAEgYYEFGGCY6wEhBnD4YYjPCIEHRSpeFZIz1lgXDKWU6AHOFyiYC4JHmqDihQccLMEGMIQQggfi
jsPzgQc28MGHFzhArTXWaugApXLXUMSkF9ZNARKAhZAgaEZXVSQSM9SAxBE/3kX/A2OH10ghspII
hZfVAcyIxIYMIgmbVjTQMENjenk4ghHDWuIvAZkaeOGDAFY44gicOUizyC6VUooJHzSIoEjWcFCt
oxpoyK4hRdIt6YgQCnUY6TPw+ODepteABGoyIDlihnfHiITgSNygQw46Wu8jjzu6mBfiNuJ4IQNF
IB6gX7bHkOGHxVugIIKWVugAAg1MwGB5EmqYYQckqtCBBgFtaJICDnAogYYkNvjBCCPsluGBGkog
y6RyyVh7jTIcLn1igs9Q21ALOJcBjQHWQMNTM+bAg+D8+QEQe3ABIHawBt0lcAx2+F/+0NW+Mbxg
BQoAwUlAwAAMOMAB46GNBzTQ/yARQGgBCECBCS6AARM0IAKHAcISKoADG1zAAy0IWQiIYAKTuGAG
KogDHmaQghD0YF0hGBMk0GArSDSGcxugGBVoBQk7yEEIBAtD66xIhz7YoQ5bnMMZ0jAHLdqhDxUw
IMFqRSszSpAlDelPTBjAgJgYpgMuGIEjGrKCIHwAAyRAwQ1gYDMgcKAGSQADBy5CAhG8wAYkGNde
jpABDrTABW4YgxtacAEfjEAFjOLBBiTAg7TNYANd6EEKBBWoOIBhDDs4giOIkIIu3OEOnLoCD1I5
hjrIIQ9adIMWnTgHYAJzB5XMwAVBQJKaWOCHithBCzyQARy8xjUVsAETVRCC+/84wAQkiIAGKpQE
FUhiBg+wzwOs44IpuEgvFmhDGswQBzE4IgMZsMAY2sAqXYGBcy0QAhrQxap5ic4F/vwnq87QgwSw
Mw0LBRgeIrGqKo6hD3CwwgqKdgaMniEOGYsDwHhQgTGkYQAiddgR/wUJGX4ApIYaQQ3qSa8ROOAC
GaBmj9SZw42GDV5uGMEEJhACI2bMDG14qLk85wIhvMuBrOJXHALgiBCoy1AqwN8ZFGGBeaIhDWeY
wx12da84lOoPb4DJwAYQhx4qImO5OwMPikYvWRGsYgSDhAlow06AqaAGs6JXCCBwgQeopgH5aYgj
UnCGeZWhC3FQqxrcCQa8tgH/El1Qg67GUAbP9aANGSXYGjAqqTOMwQIELWirQhAAs5KhffgKWhxe
MpiyEkwFHVjBwMgQv48WCrNrIIM7eTsARVyAAQ+ABBnm1YUmVA5gY+gBBGrAARkYAG8lacQLeNgD
r7GrBYvqgQtSBYbQMqpzKnhBGNhwxjPeCmsJhNga3ICDFKC1YnGABNNoQ5bYnjUOKgCv5zzqCA7M
AK1HpBV4C4aBEYChsqejlyTWpYgRbGACG3CBI95gEg6oslbxS68MRkmGfqERgWiQwRSUAACATWIS
AADAJFYlCdYUiESYgwSJRvACszlst2Y4wz0954FjvqQDI7gnj0ObMczxYAWO/4hDGchwNUVAYgzn
UkEKzIWGHkRABngoQ2jppQQiQDJFjzhfQ1xgS0UwtmLzRSskQkABSPxrtwgkQxdCQIMloJi9a1DB
D0qzLCTEAGA7WAJsYryBBjgIAjSgAdOaAAUozGAGMgBTAy5w6R6sFWA9uIADePAuMjCVXhZwQAQm
QIP5+KCaMliXBSiguArf9EUmKcQGkrCiF/RgB0LAww56AEMY0AAHXAgDFrAQhjAUgcVFiIEQBFac
19xYZAk709+ishQZQHtFBkqQmURgg/ksIDAVmEEPGtOBi5CbUTtIQQUiUgINPAguNmDCD+xGogq0
AAfOkUAhElDmWTsCBQtKE/+2qACGg4NB4QrvgaW48HAucKoLkIbCFSJOS4gbGwtccDYPinPj5TwA
CDrB0JaW0BSmyCA4HEiABB5NBQs84AMKwAAKNMCBJtUgAj5g9M2AADwK2GABiKDAC2DDhBBwyDQU
qOCsA/CIEEQCAMpm8YqXDQUj7EQL4FOTspDQA6uzWOwtHjsArkBxKHRB7ZzCQtndvmwAfEkCJ6RB
Cd7YgBC8Xe8/3ABrUOWaEVhFCU1ggpwc4HQZsLgPfBBA4x3f+D1AAgA80EAHnXADEtCACADww+M9
//g+AIAKgmOKm6jA+c+nPvQzYIAHPtBpEkiAAqhPvedD72vFIaE1FtBWE5D/UPjC3+BFf3gBAO7w
+D3UwQ9+oAPjG08HAMRBNb5RHKoAgIc+ZF/72t+D40OPkyj8QFmoybPeFe99AFjAA61ngHAvMHvs
dx/y2Qe9HwAABWftYIdd2NaHqJMgGvCAF2GE4usDx4M+ANgBFTC+x2OxFnhACGwBHhi7zoM8FpM/
AcgDFoMB6OIAKdgII5hADKw9AQi9EFAACcggiIAABxA7A2y80AOABmQxC3iBHXgC5FoC3uAAJlgC
JIABeMsL7XgDHACASHA+yNuDPdCDx6sDAJgBFpiCDPApFzgzABhBEhQAFvu7nKmBB5hAOlBCJmw8
PRBDx9MDFmsLIiiNMrEB/xbLQvS7AjAgvCRQEz/LicIxkyn4A6ebAqmDhOb7vD2wPwAIAVIpiz9o
hBR4OzzwgzvQuwh8QCvEQhJksRKAgBKQCAcogRkwvuX7RFAMRRbrkDU0AhHwAXh7APpwgQkgM6db
RAp0vD0YuxXbi0dgMTsgQcZDwBGYwip0AQh8QzgsQQD4NRwokxCCgU6kxNpjMUbbngiomQSxgV9k
ASF8kUVkxtRjMZQgQAB4QQFAw7EDx1lMgQAYlUTcG0cQxsYLRTpAPwuIxAfUtbKrQAGYxbIbJwrY
ANP4AWCUxAywMKcLgGwcxsbjRpRogRZ7xyzkAzyYBBnYCxYbwywMPRmoQq551LePOTF7nEVIODgo
oIIEkcR/bIEJsMbH6UNYNL+ymwDtSDwWuwMxyr48IEQAgIRH0I4WwAOWLLsXeINGaIRWcoRH8Atg
JILyKzshQIIkkKQIrMIMeIQj4MOBPAmqrMpZK5UpQBWjMzoccEmsHMiUNAl5kkdg/MWnnIAecYS3
CUu3fEu4jMtZa4SinAC0hMAqnIApcIRGgAy5/EvADEy3jIxEFIS9OYK+PEe5DAgAO6==

-----=AD_2000_BOUNDARY_00c45301b73700ebc3014a4700cf1f--




From chet@granite.ins.cwru.edu Mon Dec 04 10:00:06 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 142x65-0006Gf-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 04 Dec 2000 10:00:06 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA05113; Mon, 4 Dec 2000 10:00:01 -0500 (EST) (from chet)
Message-Id: <200012041500.KAA05113@granite.INS.CWRU.Edu>
Date: Mon, 4 Dec 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 news@oceanus.connect.org.uk Tue Dec 05 08:24:49 2000
Received: from mailbox2.ucsd.edu ([132.239.1.54])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 143I5R-0000uq-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 05 Dec 2000 08:24:49 -0500
Received: from oceanus.connect.org.uk ([195.188.160.23])
	by mailbox2.ucsd.edu (8.11.0/8.11.0) with ESMTP id eB5DRqN20111
	for <gnu-bash-bug@moderators.isc.org>; Tue, 5 Dec 2000 05:27:52 -0800 (PST)
Received: (from news@localhost)
	by oceanus.connect.org.uk (8.11.1/8.8.6) id eB5DOjT28982
	for gnu-bash-bug@moderators.isc.org; Tue, 5 Dec 2000 13:24:45 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: qewprd@ll.com
Newsgroups: gnu.bash.bug,gnu.cfengine.bug
Subject: these young girls take wonderful ass shots  5639
Date: 5 Dec 2000 13:24:45 GMT
Organization: Connect, The University of Liverpool
Lines: 3
Message-ID: <90iqat$rdi$598@oceanus.connect.org.uk>
NNTP-Posting-Host: waves.connect.org.uk
X-Trace: oceanus.connect.org.uk 976022685 28082 195.188.160.7 (5 Dec 2000 13:24:45 GMT)
X-Complaints-To: usenet@connect.org.uk
NNTP-Posting-Date: 5 Dec 2000 13:24:45 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/>

http://www.lightningfree.com/13/placez/
gfvsqolliicfkcsnsrvukkgdltiqpcuyouhuirjbtittsfdxuomvguljzbjufzyrtbzggmklbeheu



From root@repack.togetherweb.com Wed Dec 06 15:48:08 2000
Received: from [216.162.35.152] (helo=repack.togetherweb.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 143lTz-0007Jb-00
	for <bug-bash@gnu.org>; Wed, 06 Dec 2000 15:48:07 -0500
Received: (from root@localhost)
	by repack.togetherweb.com (8.9.3/8.9.3) id PAA14317
	for bug-bash@gnu.org; Wed, 6 Dec 2000 15:47:52 -0500
Date: Wed, 6 Dec 2000 15:47:52 -0500
From: root <root@repack.togetherweb.com>
Message-Id: <200012062047.PAA14317@repack.togetherweb.com>
To: bug-bash@gnu.org
Subject: bash2 running as bash1
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: 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 repack.togetherweb.com 2.2.17 #6 SMP Sun Dec 3 15:28:01 EST 2000 i686 unknown
Machine Type: i386-redhat-linux-gnu

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

Description:
	
   root's shell is /bin/bash2. When I log in as root, I get none of the bash2 functionality.
   The \j in my $PS1 is not interpreted, for example.

Repeat-By:
   
   [jehsom@screw ~]$ ssh -lroot repack
   Last login: Wed Dec  6 15:34:41 2000 from [censored]
   You have new mail.
   (rc:0)(jobs:\j)[root@repack ~]# echo $BASH_VERSION
   1.14.7(1)
   (rc:0)(jobs:\j)[root@repack ~]# grep root /etc/passwd
   root:x:0:0:root:/root:/bin/bash2
   operator:x:11:0:operator:/root:
   (rc:0)(jobs:\j)[root@repack ~]# /bin/bash2 --version
   GNU bash, version 2.03.8(1)-release (i386-redhat-linux-gnu)
   Copyright 1998 Free Software Foundation, Inc.
   (rc:0)(jobs:\j)[root@repack ~]# ls -l /bin/bash /bin/bash2
   -rwxr-xr-x    1 root     root       316848 Feb 27  2000 /bin/bash*
   -rwxr-xr-x    1 root     root       446800 Feb  2  2000 /bin/bash2*
   (rc:0)(jobs:\j)[root@repack ~]# /bin/bash2
   (rc:0)(jobs:\j)[root@repack ~]# echo $BASH_VERSION
   1.14.7(1)
   (rc:0)(jobs:\j)[root@repack ~]# 
   


From news@taliesin.netcom.net.uk Wed Dec 06 23:53:14 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 143t3Q-0006re-00
	for <bug-bash@prep.ai.mit.edu>; Wed, 06 Dec 2000 23:53:13 -0500
Received: (from smap@localhost) by briar.org (8.9.1b+Sun/8.6.12) id XAA18236 for <gnu-bash-bug@moderators.isc.org>; Wed, 6 Dec 2000 23:53:10 -0500 (EST)
X-Authentication-Warning: backdraft.briar.org: smap set sender to <news@taliesin.netcom.net.uk> using -f
Received: from taliesin.netcom.net.uk(194.42.224.159) by backdraft via smap (V2.1)
	id xma018234; Wed, 6 Dec 00 23:52:43 -0500
Received: (from news@localhost) by taliesin.netcom.net.uk (8.8.8/8.7.3) id EAA20445 for gnu-bash-bug@moderators.isc.org; Thu, 7 Dec 2000 04:52:41 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "Dan Jacobson" <jidanni@kimo.FiXcomTHiS.tw>
Newsgroups: gnu.bash.bug
Subject: filename completion suggestions
Date: Thu, 7 Dec 2000 12:21:09 +0800
Organization: Taiwan is Taiwan is not China
Lines: 25
Message-ID: <90n52n$jul$3@taliesin.netcom.net.uk>
NNTP-Posting-Host: as7po51.tc.ficnet.net.tw
X-Trace: taliesin.netcom.net.uk 976164761 20437 202.145.50.51 (7 Dec 2000 04:52:41 GMT)
X-Complaints-To: abuse@corp.netcom.net.uk
NNTP-Posting-Date: 7 Dec 2000 04:52:41 GMT
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
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= the one found in mandrake 7.2]

when one hits TAB and is presented with the '200 etc. possibilities show all y
or n' question,
one should be able to hit another TAB to see them all, and not have to be forced
to
use y.

also the possibility list should have / * etc. appended like ls's flags can do
to show
directories, links, executables, etc. ... if possible...

environment variables could optionally be part of expansion candidates
LS_<TAB>  should expand to LS_COLORS=
or even better have the current value right there at the end of the
expansion for handy editing: LS_COLORS=XXXXXXXX...
[though LS_COLORS is a bad example here as it is so long.]
the option could be part of .bashrc etc...  maybe it's already there :-)
initialy this option could be on as it shouldn't break anything as it is a pure
interactive feature.
--
www.geocities.com/jidanni E-mail: restore ".com."  ¿n¤¦¥§
Tel:+886-4-5854780; starting in year 2001: +886-4-25854780




From chet@nike.ins.cwru.edu Thu Dec 07 12:00:48 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1444PY-0000uq-00
	for <bug-bash@gnu.org>; Thu, 07 Dec 2000 12:00:48 -0500
Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA06687; Thu, 7 Dec 2000 11:53:42 -0500 (EST) (from chet@nike.ins.cwru.edu)
Date: Thu, 7 Dec 2000 11:24:15 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: jidanni@kimo.com.tw
Subject: Re: filename completion suggestions
Cc: chet@nike.ins.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001207162415.AA27945.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 jidanni@kimo.FiXcomTHiS.tw of Thu, 7 Dec 2000 12:21:09 +0800 (id <90n52n$jul$3@taliesin.netcom.net.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/>

> when one hits TAB and is presented with the '200 etc. possibilities show all y
> or n' question,
> one should be able to hit another TAB to see them all, and not have to be forced
> to
> use y.

The prompt is only presented if you exceed the default limit of 100
possible completions.  You can set the readline variable
`completion-query-items' to a larger value. 

Set the readline variable `show-all-if-ambiguous' to `on' to have
readline list the possible completions immediately.

> also the possibility list should have / * etc. appended like ls's flags can do
> to show
> directories, links, executables, etc. ... if possible...

Set the readline variable `visible-stats' to `on'.

> environment variables could optionally be part of expansion candidates
> LS_<TAB>  should expand to LS_COLORS=

Bash has a variable completion function bound to M-$ in emacs mode.

> or even better have the current value right there at the end of the
> expansion for handy editing: LS_COLORS=XXXXXXXX...

Try this, which is from my own inputrc, and change it to suit your needs:

# edit the path
"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"

Here's another binding that allows you to edit the value of a variable
whose name is the previous word on the input line.  It may be used
immediately after completing the variable name with M-$.

"\C-xv": "\M-b\M-d\C-y=${\C-y}\M-\C-e\C-a\M-f\C-f"

Everything but the last bit is in the manual; look there for additional
details.


-- 
``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@taliesin.netcom.net.uk Thu Dec 07 13:31:20 2000
Received: from sprettur.isnet.is ([193.4.58.19])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1445p9-00048B-00
	for <bug-bash@prep.ai.mit.edu>; Thu, 07 Dec 2000 13:31:19 -0500
Received: from taliesin.netcom.net.uk (taliesin.netcom.net.uk [194.42.224.159])
	by sprettur.isnet.is (8.11.1/8.11.0/isnet) with ESMTP id eB7IVCD26887
	for <gnu-bash-bug@moderators.isc.org>; Thu, 7 Dec 2000 18:31:12 GMT
	(envelope-from news@taliesin.netcom.net.uk)
Received: (from news@localhost) by taliesin.netcom.net.uk (8.8.8/8.7.3) id SAA18798 for gnu-bash-bug@moderators.isc.org; Thu, 7 Dec 2000 18:31:09 GMT
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "Dan Jacobson" <jidanni@kimo.FiXcomTHiS.tw>
Newsgroups: gnu.bash.bug
Subject: Re: filename completion suggestions
Date: Fri, 8 Dec 2000 02:30:28 +0800
Organization: Taiwan is Taiwan is not China
Lines: 31
Message-ID: <90ol1b$ib5$1@taliesin.netcom.net.uk>
References: <1001207162415.AA27945.SM@nike.ins.cwru.edu>
NNTP-Posting-Host: as6po188.tc.ficnet.net.tw
X-Trace: taliesin.netcom.net.uk 976213869 18789 202.145.51.188 (7 Dec 2000 18:31:09 GMT)
X-Complaints-To: abuse@corp.netcom.net.uk
NNTP-Posting-Date: 7 Dec 2000 18:31:09 GMT
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
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/>

> > when one hits TAB and is presented with the '200 etc.
> possibilities show all y
> > or n' question,
> > one should be able to hit another TAB to see them all, and not
> have to be forced
> > to
> > use y.
>
> The prompt is only presented if you exceed the default limit of 100
> possible completions.  You can set the readline variable
> `completion-query-items' to a larger value.
>
> Set the readline variable `show-all-if-ambiguous' to `on' to have
> readline list the possible completions immediately.

I'm saying I want a second tab to be an equivalent to a 'y' in the default
setup.

> > environment variables could optionally be part of expansion candidates
> > LS_<TAB>  should expand to LS_COLORS=
>
> Bash has a variable completion function bound to M-$ in emacs mode.

[grasping for questions to show that I'm smart:] Ok, but what if one wants
TAB to do both jobs?
--
Dan Jacobson  http://www.geocities.com/jidanni
Tel:+886-4-5854780; starting year 2001: +886-4-25854780
restore .com. to reply




From chet@nike.ins.cwru.edu Thu Dec 07 13:51:28 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14468e-0004zI-00
	for <bug-bash@gnu.org>; Thu, 07 Dec 2000 13:51:28 -0500
Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id NAA07838; Thu, 7 Dec 2000 13:44:42 -0500 (EST) (from chet@nike.ins.cwru.edu)
Date: Thu, 7 Dec 2000 13:34:44 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: jidanni@kimo.com.tw
Subject: Re: filename completion suggestions
Cc: bug-bash@gnu.org, chet@nike.ins.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001207183444.AA29149.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 jidanni@kimo.FiXcomTHiS.tw of Fri, 8 Dec 2000 02:30:28 +0800 (id <90ol1b$ib5$1@taliesin.netcom.net.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/>

> > The prompt is only presented if you exceed the default limit of 100
> > possible completions.  You can set the readline variable
> > `completion-query-items' to a larger value.
> 
> I'm saying I want a second tab to be an equivalent to a 'y' in the default
> setup.

That's rarely what's wanted.  Set completion-query-items to something like
32768.  It's as simple as putting

set completion-query-items 32768

into ~/.inputrc.

> > > environment variables could optionally be part of expansion candidates
> > > LS_<TAB>  should expand to LS_COLORS=
> >
> > Bash has a variable completion function bound to M-$ in emacs mode.
> 
> [grasping for questions to show that I'm smart:] Ok, but what if one wants
> TAB to do both jobs?

One could write a shell function and bind it to particular commands with
the programmable completion mechansims.  For example,

complete -v export local readonly

tells readline that export, local, and readonly complete shell variable
names.  Look at the scripts in examples/complete and the Programmable
Completion section of the manual page (in the READLINE section).

There's currently no way to replace the default completion mechanisms with
programmable completion functions, though.

-- 
``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 thedler@lucent.com Fri Dec 08 08:02:17 2000
Received: from auemail1.lucent.com ([192.11.223.161] helo=auemlsrv.firewall.lucent.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144NAG-0002bM-00
	for <bug-bash@gnu.org>; Fri, 08 Dec 2000 08:02:16 -0500
Received: from auemlsrv.firewall.lucent.com (localhost [127.0.0.1])
	by auemlsrv.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id IAA20699
	for <bug-bash@gnu.org>; Fri, 8 Dec 2000 08:02:15 -0500 (EST)
Received: from nbgif1.de.lucent.com (h135-248-192-26.lucent.com [135.248.192.26])
	by auemlsrv.firewall.lucent.com (Pro-8.9.3/8.9.3) with ESMTP id IAA20684
	for <bug-bash@gnu.org>; Fri, 8 Dec 2000 08:02:14 -0500 (EST)
Received: from slds1.de.lucent.com (slds1.de.lucent.com [135.248.201.5])
	by nbgif1.de.lucent.com (8.8.5/8.8.5) with ESMTP id OAA16727;
	Fri, 8 Dec 2000 14:02:11 +0100 (MET)
Received: from lucent.com (sicds1 [135.248.203.159])
	by slds1.de.lucent.com (8.8.8/8.8.5) with ESMTP id OAA09435;
	Fri, 8 Dec 2000 14:02:09 +0100 (MET)
Message-ID: <3A30DBD4.1EE8E386@lucent.com>
Date: Fri, 08 Dec 2000 14:02:12 +0100
From: Thomas Hedler <thedler@lucent.com>
Organization: Lucent Technologies
X-Mailer: Mozilla 4.73C-CCK-MCD EMS-1.5/4.72 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org
Subject: echo $"hgh" evaluation problem
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/>

Hi there!

We are trying to establish Linux as an alternative platform
beside Solarix(2.5,2.7) and HP-UX(9,10,11) here.
But trying to run some of our scripts we discovered the following
problem:

Linux (bash-2.04, RedHat6.1 /bin/bash2):
> echo $
$
> echo $"hi"
hi



Linux (bash-1.14,Solaris(all),Hp-UX(all)):
> echo $
$
> echo $"hi"
$hi
^

This looks like a bug!


In the README you have said that you need the following information:

        * the version number and release status of Bash (e.g., 2.01-release)
bash 2.04

        * the machine and OS that it is running on (look at the file
          `.made' in the bash build directory)
i686-gnu-linux RedHat 6.1

        * a list of the compilation flags or the contents of `config.h', if
          appropriate
Sorry in the moment I have a NFS problem...

        * a description of the bug
see above

        * a recipe for recreating the bug reliably
see above

        * a fix for the bug if you have one!
sorry I don't have one yet.


Regards 
  Thomas


From chet@nike.ins.cwru.edu Fri Dec 08 11:23:53 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144QJK-0000dq-00
	for <bug-bash@gnu.org>; Fri, 08 Dec 2000 11:23:50 -0500
Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA03000; Fri, 8 Dec 2000 11:23:42 -0500 (EST) (from chet@nike.ins.cwru.edu)
Date: Fri, 8 Dec 2000 11:23:01 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: thedler@lucent.com
Subject: Re: echo $"hgh" evaluation problem
Cc: bug-bash@gnu.org, chet@nike.ins.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001208162301.AA44839.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 thedler@lucent.com of Fri, 08 Dec 2000 14:02:12 +0100 (id <3A30DBD4.1EE8E386@lucent.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/>

> Hi there!
> 
> We are trying to establish Linux as an alternative platform
> beside Solarix(2.5,2.7) and HP-UX(9,10,11) here.
> But trying to run some of our scripts we discovered the following
> problem:
> 
> Linux (bash-2.04, RedHat6.1 /bin/bash2):
> > echo $
> $
> > echo $"hi"
> hi

Read item 1 in the COMPAT 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 mathias@koerber.org Fri Dec 08 15:07:33 2000
Received: from sprettur.isnet.is ([193.4.58.19])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144Tnp-0008Ci-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 08 Dec 2000 15:07:33 -0500
Received: from mail.fu-berlin.de (root@mail.fu-berlin.de [160.45.11.165])
	by sprettur.isnet.is (8.11.1/8.11.0/isnet) with ESMTP id eB8K7TD19209
	for <gnu-bash-bug@moderators.isc.org>; Fri, 8 Dec 2000 20:07:30 GMT
	(envelope-from mathias@koerber.org)
Received: by mail.fu-berlin.de (Smail3.2.0.98)
	  from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp
	  id <m144Tnk-00acA1C>; Fri, 8 Dec 2000 21:07:28 +0100 (MET)
Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98)
	  from news.fu-berlin.de with bsmtp
	  id <m144Tnk-000wIAC>; Fri, 8 Dec 2000 21:07:28 +0100 (MET)
To: gnu-bash-bug@moderators.isc.org
Path: vademecum.koerber.ORG!not-for-mail
From: Mathias Körber <mathias@koerber.org>
Newsgroups: gnu.bash.bug
Subject: Is bash still being actively developed?
Date: Sat, 09 Dec 2000 04:07:25 +0800
Lines: 5
Message-ID: <eqf23ts0ofsomqp51tlqjr3i5fgovsag65@4ax.com>
NNTP-Posting-Host: vademecum.koerber.org (203.127.219.243)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 976306046 2220441 203.127.219.243 (16 [13145])
X-Newsreader: Forte Agent 1.8/32.548
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/>

The latest version on the GNU sites seems to be 2.03 from Feb 1999.

Is there a site one can mail feature suggestions etc to?

thanks


From news@corpeast.baynetworks.com Fri Dec 08 18:46:48 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 144XE0-0007Wn-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 08 Dec 2000 18:46:48 -0500
Received: from ns1.baynetworks.com ([134.177.3.20] helo=baynet.baynetworks.com)
	by chx400.switch.ch with esmtp (Exim 3.15 #3)
	id 144XDx-00020I-00
	for gnu-bash-bug@moderators.isc.org; Sat, 09 Dec 2000 00:46:46 +0100
Received: from mailhost.BayNetworks.COM (h016b.s86b1.BayNetworks.COM [134.177.1.107])
	by baynet.baynetworks.com (8.9.1/8.9.1) with ESMTP id PAA21611
	for <gnu-bash-bug@moderators.isc.org>; Fri, 8 Dec 2000 15:45:07 -0800 (PST)
Received: from mailhost.corpeast.BayNetworks.COM (ns3.corpeast.baynetworks.com [132.245.135.91])
	by mailhost.BayNetworks.COM (8.9.1/8.8.8) with ESMTP id PAA28279
	for <gnu-bash-bug@moderators.isc.org>; Fri, 8 Dec 2000 15:33:01 -0800 (PST)
Received: from spinner.corpeast (spinner.corpeast.baynetworks.com [132.245.135.88])
	by mailhost.corpeast.BayNetworks.COM (SMI-8.6/BNET-97/05/05-S) with SMTP
	id SAA00047; Fri, 8 Dec 2000 18:39:44 -0500
	for <gnu-bash-bug@moderators.isc.org>
Received: by spinner.corpeast (SMI-8.6/SMI-SVR4)
	id SAA17925; Fri, 8 Dec 2000 18:34:36 -0500
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "Paul D. Smith" <psmith@gnu.org>
Newsgroups: gnu.bash.bug
Subject: Re: Is bash still being actively developed?
Date: 08 Dec 2000 18:34:35 -0500
Organization: GNU's Not Unix!
Lines: 16
Message-ID: <p5zoi61o8k.fsf@lemming.engeast.baynetworks.com>
References: <eqf23ts0ofsomqp51tlqjr3i5fgovsag65@4ax.com>
Reply-To: psmith@gnu.org
NNTP-Posting-Host: lemming.engeast.baynetworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
X-Trace: spinner.corpeast.baynetworks.com 976318475 16431 192.32.150.127 (8 Dec 2000 23:34:35 GMT)
X-Complaints-To: usenet@spinner.corpeast.baynetworks.com
NNTP-Posting-Date: 8 Dec 2000 23:34:35 GMT
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/>

%% mathias@koerber.org (Mathias Körber) writes:

  mk> The latest version on the GNU sites seems to be 2.03 from Feb 1999.

What GNU sites are those?  At the official site (ftp.gnu.org) you'll
find many versions more recent than that.

  mk> Is there a site one can mail feature suggestions etc to?

This newsgroup is a good place.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


From mathias@koerber.org Fri Dec 08 20:32:14 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 144Ys2-00026N-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 08 Dec 2000 20:32:14 -0500
Received: from mail.fu-berlin.de (root@mail.fu-berlin.de [160.45.11.165])
	by rutgers.rutgers.edu (8.8.8/8.8.8) with ESMTP id UAA20123
	for <gnu-bash-bug@moderators.isc.org>; Fri, 8 Dec 2000 20:32:12 -0500 (EST)
Received: by mail.fu-berlin.de (Smail3.2.0.98)
	  from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp
	  id <m144Yrz-00acA1C>; Sat, 9 Dec 2000 02:32:11 +0100 (MET)
Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98)
	  from news.fu-berlin.de with bsmtp
	  id <m144Yru-000wIAC>; Sat, 9 Dec 2000 02:32:06 +0100 (MET)
To: gnu-bash-bug@moderators.isc.org
Path: vademecum.koerber.ORG!not-for-mail
From: Mathias Körber <mathias@koerber.org>
Newsgroups: gnu.bash.bug,gnu.misc.discuss
Subject: GNU mirrors (was: Is bash still being actively developed?)
Followup-To: gnu.misc.discuss
Date: Sat, 09 Dec 2000 09:32:00 +0800
Lines: 25
Message-ID: <mk233ts14i083sr549bu8ip6ss1c8l8lf2@4ax.com>
References: <eqf23ts0ofsomqp51tlqjr3i5fgovsag65@4ax.com> <p5zoi61o8k.fsf@lemming.engeast.baynetworks.com>
NNTP-Posting-Host: vademecum.koerber.org (203.127.219.243)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: fu-berlin.de 976325525 2181403 203.127.219.243 (16 [13145])
X-Newsreader: Forte Agent 1.8/32.548
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by rutgers.rutgers.edu id UAA20123
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/>

On 08 Dec 2000 18:34:35 -0500, "Paul D. Smith" <psmith@gnu.org> wrote:

>%% mathias@koerber.org (Mathias K=F6rber) writes:
>
>  mk> The latest version on the GNU sites seems to be 2.03 from Feb 1999.
>
>What GNU sites are those?  At the official site (ftp.gnu.org) you'll
>find many versions more recent than that.

ftp.gnu.org was full (too many users), so I went to one of the
officially listed mirrors (labrea.stanford.edu) and it ends
at 2.03...

Another listed mirror (ftp.hawaii.edu) does not seem to have
a mirrors directory anymore at all) :-(

Fup to: gmd
>
>  mk> Is there a site one can mail feature suggestions etc to?
>
>This newsgroup is a good place.


Ok. thanks



From mathias@koerber.org Fri Dec 08 20:42:08 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 144Z1b-0002Ek-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 08 Dec 2000 20:42:08 -0500
Received: from mail.fu-berlin.de ([160.45.11.165])
	by chx400.switch.ch with esmtp (Exim 3.15 #3)
	id 144Z1a-0002EZ-00
	for gnu-bash-bug@moderators.isc.org; Sat, 09 Dec 2000 02:42:06 +0100
Received: by mail.fu-berlin.de (Smail3.2.0.98)
	  from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp
	  id <m144Z1Z-00acA1C>; Sat, 9 Dec 2000 02:42:05 +0100 (MET)
Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98)
	  from news.fu-berlin.de with bsmtp
	  id <m144Z1Z-000wIAC>; Sat, 9 Dec 2000 02:42:05 +0100 (MET)
To: gnu-bash-bug@moderators.isc.org
Path: vademecum.koerber.ORG!not-for-mail
From: Mathias Körber <mathias@koerber.org>
Newsgroups: gnu.bash.bug
Subject: Suggestion: elapsed time
Date: Sat, 09 Dec 2000 09:42:02 +0800
Lines: 22
Message-ID: <7t233tokigvu7u20ogirtrms658ar5kuq3@4ax.com>
NNTP-Posting-Host: vademecum.koerber.org (203.127.219.243)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 976326124 2192566 203.127.219.243 (16 [13145])
X-Newsreader: Forte Agent 1.8/32.548
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 love to see a prompt-variable (\e?) that shows the
time elapsed between start of execution of a command until the
shell prints the next prompt.

yes, time(1) and friends can be used for this, but I would like to
continuously record this, and the most convenient place would be in
PS1. The way I see this work:
Just before turning its attention to the execution of whatever command
was entered (ie before an exec(2), or if it's done internally some
other convenient point), it should record the time, and
retrieve that info and print the difference right after the
interactive session takes over again. For amp'd-off (&) commands,
this would just record the time it took to spawn the subshell.

In my view it should not record the time user's idle time, but only
start counting after ENTER is pressed.

Resolution should be in milliseconds or better.

I would also lov a a more concise date-format for \d (YYYYMMDD).

regards


From lider@arka.ids.bielsko.pl Fri Dec 08 21:15:04 2000
Received: from arka.ids.bielsko.pl ([195.117.233.8])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144ZXT-0003C4-00
	for <bug-bash@prep.ai.MIT.Edu>; Fri, 08 Dec 2000 21:15:04 -0500
Received: by arka.ids.bielsko.pl (8.9.3/8.9.3) id DAA25451
	for bug-bash@prep.ai.MIT.Edu; Sat, 9 Dec 2000 03:12:38 +0100 (MET)
Date: Sat, 9 Dec 2000 03:12:38 +0100 (MET)
Message-Id: <200012090212.DAA25451@arka.ids.bielsko.pl>
Subject: Il Nuovo Concorso Europeo di Promozione
From: office@euroleader.org
MIME-Version: 1.0
To: bug-bash@prep.ai.MIT.Edu
Content-Type: multipart/alternative;
 boundary="------------379311F1F2CE481DAAF3A14D"
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/>


--------------379311F1F2CE481DAAF3A14D
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

                            Egregi Signori,

  Salutiamo cordialmente e presentiamo una nuova iniziativa economica
per i produttori di tutti i paesi europei - sia dell'ovest che dell'est.

      PER LA PRIMA VOLTA - SU SCALA COSI GRANDE - NEL CUORE STESSO
                              DELL'EUROPA!

                                [Image]

                           "EURO LEADER 2001"

              e un titolo d'onore ed un prestigioso segno
               del Nuovo Concorso Europeo di Promozione,

     e uno strumento efficace di promozione e marketing nell'Europa
ed in particolare sui mercati sorgenti della Polonia, Reppublica Ceca ed
                      Ungheria e su altri mercati,
                     anche quello russo ed ucraino.

Il concorso e un'iniziativa polacca.
Il suo esito si terra a marzo dell'anno 2001 a Varsavia, per cui esso
rechera i migliori risultati sullo stabile mercato polacco, composto di
quasi quaranta milioni di persone, che nota una crescita economica di
piu del 5% e che fra poco diverra verzeichnet und bald zu einem
integrierenden una parte integrale del mercato dell'Unione Europea.

Fai un clic:http://www.euroleader.org/ conosci i particolari del
concorso, fai la tua domanda della partecipazione alla
rivalita europea con la partecipazione del mercato dell'est.

  Invitiamo ai nuovi mercati. Il tuo successo e garantito - per il buon
                         inizio del XXI secolo!

Con espressioni di stima e rispetto

INTERRES International Building Fair and Promotion - from Polen
B2B - Internet Portal
Tadeusz Ziobro - President.


--------------379311F1F2CE481DAAF3A14D
Content-Type: multipart/related;
 boundary="------------C870B55CAF6EC1C00E0D6074"


--------------C870B55CAF6EC1C00E0D6074
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

<center><b><font size=+1>Egregi Signori,</font></b>
<p>Salutiamo cordialmente e presentiamo una nuova iniziativa economica
<br>per i produttori di tutti i paesi europei - sia dell'ovest che dell'est.
<p><b><font size=+1>PER LA PRIMA VOLTA - SU SCALA COSI GRANDE - NEL CUORE
STESSO DELL'EUROPA!</font></b>
<p><img SRC="cid:part1.3A30DFAE.8BBC44F2@netra.bielsko.pl" height=120 width=120>
<p><b><font size=+1>"EURO LEADER 2001"</font></b>
<p>e un titolo d'onore ed un prestigioso segno
<br>del Nuovo Concorso Europeo di Promozione,
<p>e uno strumento efficace di promozione e marketing nell'Europa
<br>ed in particolare sui mercati sorgenti della Polonia, Reppublica Ceca
ed Ungheria e su altri mercati,
<br>anche quello russo ed ucraino.</center>

<p>Il concorso e un'iniziativa polacca.
<br>Il suo esito si terra a marzo dell'anno 2001 a Varsavia, per cui esso
rechera i migliori risultati sullo stabile mercato polacco, composto di
quasi quaranta milioni di persone, che nota una crescita economica di piu
del 5% e che fra poco diverra verzeichnet und bald zu einem integrierenden
una parte integrale del mercato dell'Unione Europea.
<p><b>Fai un clic:<A HREF="http://www.euroleader.org/">http://www.euroleader.org/</A> conosci i particolari del
concorso, fai la tua domanda della partecipazione alla rivalita europea con la partecipazione del mercato dell'est.</b>
<center>
<p><b>Invitiamo ai nuovi mercati. Il tuo successo e garantito - per il
buon inizio del XXI secolo!</b></center>

<p>Con espressioni di stima e rispetto
<p>INTERRES International Building Fair and Promotion - from Polen
<br>B2B - Internet Portal
<br><i>Tadeusz Ziobro - President.</i>
<br><i></i>&nbsp;</html>

--------------C870B55CAF6EC1C00E0D6074
Content-Type: image/jpeg
Content-ID: <part1.3A30DFAE.8BBC44F2@netra.bielsko.pl>
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="C:\WINDOWS\TEMP\nsmailR3.jpeg"

/9j/4AAQSkZJRgABAgEASABIAAD//gAmRmlsZSB3cml0dGVuIGJ5IEFkb2JlIFBob3Rvc2hv
cKggNS4w/+4ADkFkb2JlAGSAAAAAAf/bAIQADAgICAkIDAkJDBELCgsRFQ8MDA8VGBMTFRMT
GBEMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAENCwsNDg0QDg4QFA4ODhQU
Dg4ODhQRDAwMDAwREQwMDAwMDBEMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgA
eAB4AwEiAAIRAQMRAf/dAAQACP/EAT8AAAEFAQEBAQEBAAAAAAAAAAMAAQIEBQYHCAkKCwEA
AQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUDDDMBAAIRAwQhEjEF
QVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1RkRcKjdDYX0lXi
ZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX5/cRAAIC
AQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MVY3M0
8SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpam
tsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A1Prf9b+sdH6w/FxXtNRaHAOHCxP/ABx/
rF+8z7kv8Y//AIonf1AuVWjixQMIkxGy0kvVf+OP9Yv3mfcl/wCOP9Yv3mfcuVST/Zx/uhVl
6r/xyPrF+8z7kv8AxyPrF+8z7lysGJ7BJL2cf7oVZeq/8cj6xeLPuS/8cf6x6ElgB40WJ0bA
wOoZQxcvN+wF8Cq1zNzC4/mWO3N9Jdz176jdOp6LhG7Pbhs6ZW5l2S9kize71Poh30/UPsUU
/ZhIRMRr4K1cH/xyPrF+8z7kv/HH+sX7zPuXMXCltrxQ51lQMMe9u1zh+85ku2KHMAak6AfF
Sezj/dH2KsvVf+OP9Yv3mfcl/wCOP9Yv3mfcuby8W/DybMXIbsupdssb4EIKXtYz+iFWXqv/
ABx/rF+8z7kv/HH+sX7zPuXKpI+zj/dCrL6L9UPrf1jrHWGYuU9oqDS4ho5SWJ/i3/8AFE3+
oUlD7cPf4eEVw7KvR//QB/jH/wDFE7+oFyq6r/GP/wCKJ39QLlVqYf5uPksO6kTHZTZexl9v
oVOMPt2l+0fvbG+5yjsfsNm07AdpdGm4jdtn+qo69k9T6P0z6g0P+r2ZSzNpyH55rsx8tjSW
NFR3N7/nS/euE6rhYmDknGxsxudskWW1tLaw4fmse4/pVu4f19zOm14eH0+hg6diV+nZTYPd
cT/PWPsH8179/p7f+uLmsh1Lr7HUNLKXPc6tjuWtJ3NYY/dUOKOQSkZnQ6jb8UmmeBdRRm0X
5FZtpqe176hA3bTuDJP7zlu5n146n1LGzcPqbGXYuY39FWwBpoe33Uuqd+e1u3371zaSklCM
iCRZG3gi1fFdZ9Q6ei5/Uq8DOwPVyWTdTlNe6B6fv25FW7Z9L6D1yasYnUMvCbc3FsNJyWen
a9uj9k7jW1/5m/8AP2pZImUSAaP2KD3f+MSroeG5uV9g+0Z/UAYyS9wqbsDWb9rHfpLdv5q8
8Vh2flvwW9PfYX4tb/VqrdrsdG13pu+kxr/zmKvwJPZDFAwjwk34pKklYzcHJwbW05Ldj31s
uaP5NjfUZ/0VXTwb1CHqv8W//iib/UKSX+Lf/wAUTf6hSUH/AII/wU9H/9EH+Mf/AMUTv6gX
N4bcN2Qxuc+yvHOj7KQHPb/K2Pjcuk/xkf8Aiid/UC5XQ88d4Wni/mo+S07vqFH1K6I/6quo
ZnOdjW2DOHUNoBDWtj6H7npb15xns6fXkuZ062y/GboLrWhhcf3mMb9Gv93ctofXvrNeTW6n
YzBprFDOnxNRqA2RY76brXf6Vc67aXHYNrZO1p1gfmt/soYYZIk8Zu9Qo0skr1HQus5NLL6M
O2yqwSx7QII4THonVxkDFOJZ9ocw2Nqj3FgO0vS+84LI97Hcb4hxxuPD83Erhl2P2NJJXP2P
1T7WMI4tn2ot3imPdt/fSPRuqjKGH9ls+1FnqCmPds/fS+8Yf87D5eP54/zf7/8Ac/rK4T2L
TSV+3oPW6mF9mDcGjk7Z/wCpVKuqy2xtVTHPseYaxoJcT4bU6GbFMGUMkZiPzGMoyEfPhUYk
bgsV0H1PPTMjqdXTOo9OZnNyn7WWy4PrMbvdtc1tlPt9yz7fq/1umo22YVrWDUnbMR4hqrYe
dlYNjrsSw1WuY6v1G/Sa130/Td+Y530d6aMmPNCXtZIzrS8cuLhl5wUQRuCPN9K+v37ExsBn
UX9Prz8gn7LVaXHZXG5w9X0nDds93sXl5MmdBOunCNXm5VeLbhtsP2a8h1lR1aXtMttG76Nv
8tARxY+CNE8Xj4KJt6r/ABb/APiib/UKSX+Lf/xRN/qFJM/8Ef4Kuj//0gf4yP8AxRO/qBc3
i4eRmOsZjsL3VVvuePBlY32OXSf4xzH1jJiYYNDwun+oNHQcrAtz6MAYV75xLyXudW+Yc5tP
qO/P/dV/3PbwxNXoFtavl3mkFu/W1nSMTqVvTemYH2QYj9llr3Oc95j8xrnOayrX+2sIKeMu
IA1V90PpP1eJ/wCbOIRYKSKTFroIb7ne87vaqeFbY/62NbZlMzdmG6Law1oEunZ+iLmqj0n6
2dHxekUdPyqrbHVsLLQGhzDJcY1P8pUr/rL0/H6zj5/SsYV011Gq6na2vfuPujZ+d/KXIQ+F
85LPz49iQ98Z/anIY+A8fqh+s/nI8f8AiNw5YcOP1D08Nh3Xf+Lqv/wmVJ//AIuKv/CJ/KVW
/wCeH1b9cZxx7ftmz0w7YN23/R7921ZVH1pod9Y3dWy63MoFJprrZDnAfmzwm4vh/OzEieXn
j9rkZcp6+G8ub/VqOSAr1A3Pj8g9q05rMy6yx9bcBtbTWPzw8fzrnO/0e1ZH1cb07L6r1Tqm
IGkPtbXU+IgbZssaPzfWeqVf15xB1C57mWuwXsb6Ygbm2DR/tn+bsWVhfWPF6X1bIu6ex1nT
8shz8d8Nc13P6Plvs/NUfL/Bue9jmoHFLHlyYMccfDUMOSMZQyZcWT/yo9H/AKUTLNDiibsA
m+48f7r03S/rFkZ3WcnpzsU1Mo3bbZM+w7f0kjb+k/NXKfXDFpxuuWikBjbWNtcwaAOcPdH9
b6S6G76+9HbWXU1W2XEfQIDBP8uyVxnUM7I6jmWZmQQbLTwOAB9Fjf5LFo/BOR5jHzks55Y8
lg9kYjjlPj93KOH9Z6mPPOJgI8XHK7vsELKrXgllbngclrS6PjtC0+qfV/M6djdPudXY451H
rOaGk7Xbv5v2/wDB+k9T+qmf1LE6zjMwLvS+0WNZcH61mv6Vjrmn/R17nb/zF3fX/rji5XR8
7/m/mN+24hBedvuNUhl1uLv+nt3fzi38mScZxAAIO/19Pqa4Dy/+Llrm/WMNcC1wYZBEEfFJ
L/F05z/rJve4ve5pLnOMkk/nOJSQ/wDBH+Aro//TB/jI/wDFE7+oFzz+o5j8WjD9VzMfGJfV
Ww7RvJ3G5236Vv8ALXQ/4yP/ABRO/qBcoSBqTHxWniAOOHktO7Yzc7Kz7vtGW/1b9rWOsP0n
Bg2sNn7z9v56AeCrf7Nv/Y/7Y0+zfaPs0/ytu/du/wCgqcgg7TPwUka6dNEPR/Wqqqvp/RzW
xrC7HJcWgAnRn0o+ktPJqya/qtjWYmHj21uxT9rueAHsEaWV/vvVTrD+jdR6PiOHUGsycLHh
tAEl7y1v6M/u/RUc67puZ0DCrHUhRfiY53YzZPqOI/mX8N/NXMAzli5OBjkBxc1m97jxZ5xq
css8XycHHH1Q4J/zcGzoDM6axFUYtn6mdPxremZD8ljXnMsNFRcAT7WH6O5VvqrW3Gp6w62l
ltmGyQ2xocNzN/j/AFUfC650jp3TukYzgMiyt3qWvY4j0bHfSfY2P0nts+ip42Z0VvUOts+2
114+e1vpW6kS5p9Tbp+Y5Mzy5mUueM8eb2uYljnj9Mj6OV5qGGXt8Hr9eD1/KmPD6KIuII/x
otDruNg5XSsDruLS3GfkvFeRSzRu6eWt/rNWn9casijprhj4dDcJzGC3JADbGvJ0awN/NWR1
3qXThgYXRumPN2PhuD7LyI3O/k/e5zlb+td/TOoU/asbqQc+uprBhtmHkH6Wvt3NlS48eYZf
h5nHIMUcvMGAywy5ZQwe7j+6xy8H83Pg/m5Z/wCbQTGslVdR2r5v0nZx8VtlXTqX4dD+n3Ym
7MvcxoLXBrdh9T81ef3NY26xtZ3Vh7gw+LQfb/0V2ret9Jtw6emX5LBj3YPp2v1hlrdoa1+i
4gtIO3mDEjv8FY+A480ZcwcsZwsjhjIS4Zx483631/5X/J/7OGJbnIPDWv8ALZYGPyJAxxp8
Fq9D+r2Z1bKuobXZX6NFl0lpbLmj9DX7h/hLFmupvY3dZU9g4Jc1zRPh7gtwSBJF6jdgen/x
b/8Aiib/AFCkl/i3/wDFE3+oUlD/AOCP8FPR/9QH+Mj/AMUTv6gXO4Gff0/JblUBjns5ZY0P
Y4d2PY/95dF/jI/8UTv6gXLBxaQQYIMg+YWniF4og9lp3fZm53Tz00YfoYv7Rdjfav2V7du/
b6m3Zt/f/k715Dn9Qv6jkuyr2sY5/FdTAxjR2YxjP3UL7Rf6/wBp9R3r7t/qyd+7nfv+luUC
4uJc4ySSSfMoYsIxkm7v8FErJKTarHse9jS5lQDrHAaNBOwOd/aUVKhSSSSKlJJJJKUkiU49
17ntpYXmtjrXgdmME2P/ALKGgp9G+qf1vZ07oLbev5Ze193pYTY32+m2Gvsf+e6lln57lzn1
66pm5vWXsfki/AAbZhCs/o/TeNzX+36Vn5r3rnJP8Akoo4YxmZjc+H/RTb1X+Lf/AMUTf6hS
S/xb/wDiib/UKSb/AOCP8FXR/9UH+Mj/AMUTv6gXKrqv8Y//AIonf1AuVWph/m4+Sw7qUqjU
LGm1rn1z72sO1xHfa4h21yiknqfUfqv9WPq5mdCy34Vl9tHVGela66BZXsP0GQwN3Ms9y8/6
5T0bHzHY/SX33V0ktsvvIG5w9rvSraxm1rf5aOz62dYx6sOjBuOJRgD9FVXw53NlmRP896jj
9D6Czs/LObmXZbmNqdkPNj2M+iHO+ntn953uUOPHOM5GUiQdtf8ApJJQTCt4PTb87GzcmiCz
p9Qut7yC7Zt/7+q9Vj6bWW1na+shzTzBHk5esfVjreBZ0XEt6sMXDyOoF1bGBraxcGksbYa4
/P8A+20c2SUACBdn+WigHyMOB4IPwUgQCCRuAOoOkjw0Wz9a+oZeV1a/GvprxWYljq68elga
0QY3ucA11jntWKpImwCRV+KH0/6idN+reZh35+Di2022MOJlV3PNjQHAOsbS930muXGfWrH6
Dg51nTuk49zH4zy2+66wukj8yqs/mf8ACOVEdb6jXg0YFFzsfHx3G0ColpdYTu9a17fc9/7i
H1HqOT1LJ+15UOyHNa2ywCN5aNvqPH+k2/SUUMUhkMjImJ6X/iptqpJJKZD1X+Lf/wAUTf6h
SS/xb/8Aiib/AFCkoP8AwR/gp6P/1tT63/VDrHWOsPysVjRUGhoLjysT/wAbf6xfus+9eYpK
9j9/gjw8NVot0fTv/G3+sX7rPvS/8bf6xfus+9eYpJ39I/qq0fTv/G3+sX7rPvS/8bf6xfus
+9eYpJf0j+qrR9O/8bf6xfus+9Ss/wAXf1mtINm1+1oY3c6YaPosb/JXl6SX9I/qq0fULP8A
F39ZrX77S17yAC5zpMAbW6lR/wDG3+sX7rPvXmKSX9I/qK0fTv8Axt/rF+6z70v/ABt/rF+6
z715ikl/SP6qtH07/wAbf6xfus+9L/xt/rF+6z715ikl/SP6qtH2n6ofVDrHR+sMyspjTUWl
pLTwkvFklF+t979Hj4fpSdKf/9k=
--------------C870B55CAF6EC1C00E0D6074--

--------------379311F1F2CE481DAAF3A14D--





From james@amethyst.nurealm.net Fri Dec 08 23:00:31 2000
Received: from amethyst.nurealm.net ([199.45.155.21])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144bBX-0006fa-00
	for <bug-bash@gnu.org>; Fri, 08 Dec 2000 23:00:31 -0500
Received: from amethyst.nurealm.net (IDENT:500@local.host [127.0.0.1])
	by amethyst.nurealm.net (8.9.3/8.9.1) with ESMTP id VAA08649;
	Fri, 8 Dec 2000 21:03:19 -0700
Message-Id: <200012090403.VAA08649@amethyst.nurealm.net>
To: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: james@nurealm.net
Subject: Invocation and startup file compatibility with OpenSSH
Date: Fri, 08 Dec 2000 21:03:19 -0700
From: James <james@amethyst.nurealm.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/>

Can someone help me out here?

I was having trouble running the OpenSSH version of scp and discovered that
the problem occurs because the remote shell generates text output (in my
case) when calling the ~/.bashrc startup file.  (OpenSSH_2.3.0p2 with Bash
2.03.8(1)-release and with Bash 1.14.7(1) on RedHat 6.2)

Here's the problem:

1) scp selects the remote users /etc/passwd defined shell, /bin/bash in my
case, and uses execve to call it with "/bin/bash -c scp ..."

2) I call /etc/profile - which generates text output from "echo", "date",
and "tty" - from ~/.bashrc because I start non-login interactive shells from
~/.profile on my virtual terminals (open -c <vtnumber>), and I want the same
initialization as for my single login-interactive shell.

3) BASH(1) from 2.04 explicitly says

       Bash  attempts  to  determine  when it is being run by the
       remote shell daemon, usually rshd.  If bash determines  it
       is  being run by rshd, it reads and executes commands from
       ~/.bashrc, if that file exists and is readable.   It  will
       not  do  this  if invoked as sh.  The --norc option may be
       used to inhibit this behavior, and the --rcfile option may
       be  used  to  force another file to be read, but rshd does
       not generally invoke the shell with those options or allow
       them to be specified.

4) scp fails when the text is generated.

Can someone tell me what's right and wrong here?  Normally, bash shouldn't
read ~/.bashrc because it's invoked by ssh as a non interactive shell, but
here bash goes out of its way to read ~/.bashrc because it's being run by a
remote shell daemon.

Is openssh wrong to fail from text output?  (So far, they say no.)

Is there some other way to read /etc/profile but NOT read ~/.profile when
	using "open -c <vtnumber>"?

Is there some particular reason why bash reads ~/.bashrc when run by a
	remote shell daemon?

Can bash read some _different_ startup file when being invoked by a remote
	shell daemon and as a non interactive shell?

Thanks


James Feeney



From www_systems@yahoo.com Sat Dec 09 13:32:55 2000
Received: from smtp6.mail.yahoo.com ([128.11.69.103])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 144onn-0003oT-00
	for <bug-bash@gnu.org>; Sat, 09 Dec 2000 13:32:55 -0500
Received: from unknown (HELO oficina.wsystems.com) (200.41.109.219)
  by smtp.mail.vip.suc.yahoo.com with SMTP; 9 Dec 2000 18:09:53 -0000
X-Apparently-From: <www?systems@yahoo.com>
From: WWW SystemS Ltda. <www_systems@yahoo.com>
Date: Sat, 09 Dec 2000 18:11:43 GMT
Message-ID: <20001209.18114300@oficina.wsystems.com>
Subject: kill -19 and kill -18
To: bug-sh-utils@gnu.org,johnsonm@redhat.com,svalente@mit.edu,bug-bash@gnu.org
X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.1; Linux)
X-Priority: 3 (Normal)
MIME-Version: 1.0
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.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!

My name is Walter Arguello Cortes.

When executing the sleep command, and trying to control it, with the
kill command, I have a problem.

Look:

$ sleep 1000 &
[2] 736
$ jobs -l
[1]-    735     Running         sleep 500 &
[2]+    736     Running         sleep 1000 &
$ kill -19 736
$ jobs -l
[1]-    735     Running         sleep 500 &
[2]+    736     Stopped (signal)        sleep 1000
$ kill -18 736
$ jobs -l
[1]-    735     Running         sleep 500 &
[2]+    Done                            sleep 1000
$

Why my sleep 1000 & was Done?

Is this problem of: bash, sleep, kill, or Walter?

More Information:

OS:     SuSE Linux 7.0 - kernel 2.2.16
Machine: Intel PIII 550 Mhz

Thanks,



Walter.




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



From james@amethyst.nurealm.net Sat Dec 09 13:43:24 2000
Received: from amethyst.nurealm.net ([199.45.155.21])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144oxv-0004Y1-00
	for <bug-bash@gnu.org>; Sat, 09 Dec 2000 13:43:23 -0500
Received: from amethyst.nurealm.net (IDENT:500@local.host [127.0.0.1])
	by amethyst.nurealm.net (8.9.3/8.9.1) with ESMTP id LAA00572;
	Sat, 9 Dec 2000 11:17:28 -0700
Message-Id: <200012091817.LAA00572@amethyst.nurealm.net>
To: "Richard E. Silverman" <slade@shore.net>
Cc: OpenSSH Developers <openssh-unix-dev@mindrot.org>, bug-bash@gnu.org
Reply-To: james@nurealm.net
Subject: Re: openssh-SNAP-20001207 scp "Bad file descriptor" sort-of work-around
Date: Sat, 09 Dec 2000 11:17:28 -0700
From: James <james@amethyst.nurealm.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/>

On Fri, 8 Dec 2000, Richard wrote:

>> Ugh!  I'd think bash should read different startup files when invoked by a
>> remote shell daemon and when invoked as a non interactive shell.

> How would you suggest it tell the difference?

As I understand, bash already can tell the difference - that's why BASH(1)
says:

       Bash  attempts  to  determine  when it is being run by the
       remote shell daemon, usually rshd.

That's part of the reason I had a problem with scp to start with.

bash-2.04/shell.c has:
---
/* The name of the .(shell)rc file. */
static char *bashrc_file = "~/.bashrc";
---
/* Execute ~/.bashrc for most shells.  Never execute it if
   ACT_LIKE_SH is set, or if NO_RC is set.

   If the executable file "/usr/gnu/src/bash/foo" contains:

   #!/usr/gnu/bin/bash
   echo hello

   then:

         COMMAND            EXECUTE BASHRC
         --------------------------------
         bash -c foo            NO
         bash foo               NO
         foo                    NO
         rsh machine ls         YES (for rsh, which calls `bash -c')
         rsh machine foo        YES (for shell started by rsh) NO (for foo!)
         echo ls | bash         NO
         login                  NO
         bash                   YES
*/
---
static void
run_startup_files ()
{
#if defined (JOB_CONTROL)
  int old_job_control;
#endif
  int sourced_login, run_by_ssh;

  /* get the rshd/sshd case out of the way first. */
  if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 &&
      act_like_sh == 0 && local_pending_command)
    {
      run_by_ssh = find_variable ("SSH_CLIENT") != (SHELL_VAR *)0;
      run_by_ssh |= find_variable ("SSH2_CLIENT") != (SHELL_VAR *)0;

      /* If we were run by sshd or we think we were run by rshd, execute
         ~/.bashrc if we are a top-level shell. */
      if ((run_by_ssh || isnetconn (fileno (stdin))) && shell_level < 2)
        {
#ifdef SYS_BASHRC
#  if defined (__OPENNT)
          maybe_execute_file (_prefixInstallPath(SYS_BASHRC, NULL, 0), 1);
#  else
          maybe_execute_file (SYS_BASHRC, 1);
#  endif
#endif
          maybe_execute_file (bashrc_file, 1);
          return;
        }
    }

I suppose the trick is to simply replace

          maybe_execute_file (bashrc_file, 1);

with something like

          maybe_execute_file ("~/.bash_rsh", 1);


> A non-interactive session is probably one program talking to another, and
> the random text simply screws up whatever protocol they're speaking.  It's
> more reasonable to expect a transparent, unpolluted connection, than to
> expect that every pair of programs you might want to connect together
> using SSH must try to heuristically filter out stuff that "looks like
> unwanted text" from their conversation.

I can see your point.  Still, I'm not suggesting a need for any kind of
heuristic filter.  Rather, I don't see any need for scp, in particular, to
be either the enforcer or the victim of a policy expecting a transparent,
unpolluted connection.  scp is simply not being "robust" here.  There
doesn't seem to be any _need_ to have scp fail crypticly.

Though I think bash needs to distinguish between "rshd" and
"non-interactive" startup files, I also think robust behavior for scp would
be to simply display or trash, depending on the terminal status, any
inconsequential returned text.  (Remember that fierce "suicide squad" at the
end of "Life of Brian"?  scp doesn't _need_ to be a member of the "suicide
squad", does it?)

Again, please Cc me on any response, as I'm not subscribed to the list.

Thanks.


James Feeney



From news@bellatlantic.net Sat Dec 09 17:48:38 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 144snG-0003Wd-00
	for <bug-bash@prep.ai.mit.edu>; Sat, 09 Dec 2000 17:48:38 -0500
Received: from smtppop1pub.verizon.net (smtppop1pub.gte.net [206.46.170.20])
	by rutgers.rutgers.edu (8.8.8/8.8.8) with ESMTP id RAA07003
	for <gnu-bash-bug@moderators.isc.org>; Sat, 9 Dec 2000 17:48:37 -0500 (EST)
Received: from smtp-out1.bellatlantic.net (smtp-out1.bellatlantic.net [199.45.39.156])
	by smtppop1pub.verizon.net  with ESMTP
	for <gnu-bash-bug@moderators.isc.org>; id QAA30203397
	Sat, 9 Dec 2000 16:41:12 -0600 (CST)
Received: from typhoon2.gnilink.net ([199.45.45.56])
	by smtp-out1.bellatlantic.net (8.9.1/8.9.1) with ESMTP id RAA13604
	for <gnu-bash-bug@moderators.isc.org>; Sat, 9 Dec 2000 17:46:17 -0500 (EST)
Received: (from news@localhost)
	by typhoon2.gnilink.net (8.8.8+Sun/8.8.8) id RAA12829;
	Sat, 9 Dec 2000 17:46:20 -0500 (EST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: demon683@netzero.net
Newsgroups: glbs.wise.win95,gnu,gnu.announce,gnu.bash.bug,gnu.cfengine.bug
Subject: Dirty Panties
Lines: 2
Message-ID: <%CyY5.5133$Wd.576777@typhoon2.ba-dsg.net>
Date: Sat, 09 Dec 2000 22:46:19 GMT
NNTP-Posting-Host: 151.197.195.120
X-Complaints-To: newsadmin@bellatlantic.net
X-Trace: typhoon2.ba-dsg.net 976401979 151.197.195.120 (Sat, 09 Dec 2000 17:46:19 EST)
NNTP-Posting-Date: Sat, 09 Dec 2000 17:46:19 EST
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/>

Do you like dirty panties? Well, I got plenty of them to sell to you, baby. Send an e-mail to demon683@netzero.net for the dirtiest panties on the net. 


From udate@monsterhut.com Sat Dec 09 19:30:18 2000
Received: from [12.105.4.5] (helo=TRACTOR)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144uNc-0006S0-00
	for <bug-bash@gnu.org>; Sat, 09 Dec 2000 19:30:18 -0500
Received: from monsterhut.com ([12.105.4.5]) by TRACTOR with Microsoft SMTPSVC(5.0.2172.1);
	 Sat, 9 Dec 2000 19:31:25 -0500
From:  <udate@monsterhut.com>
To: bug-bash@gnu.org
Subject: A loving relationship is a cherished experience
Date: Sat, 9 Dec 2000 19:31:22
Message-Id: <41.616019.707398@monsterhut.com>
Reply-To: udate@monsterhut.com
Mime-Version: 1.0
Content-Type: text/html; charset="us-ascii"
X-OriginalArrivalTime: 10 Dec 2000 00:31:25.0500 (UTC) FILETIME=[875FB7C0:01C06240]
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/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<table>
<tr>
	<td>
<blockquote>A loving relationship is one of the most cherished experiences you can have
in life.
<br><br>
Having great friends comes pretty close behind.
<br><br>
Today there is no excuse for the vast majority of people not to enjoy both!
<br><br>
For a growing number of people time is more precious than ever. Building a
career, the ever increasing time taken commuting to and from the office,
maybe a move to another city, the list of pressures can be enormous. Often
it is the time to build and enjoy a fulfilling social life that is
sacrificed first.
<br><br>
If you, or someone you know, could do with stacking the odds in their favor
of making new friends or finding the new love of their life, the answer is
remarkably easy. Today, more than ever, people just like you, are finding
that Udate.com provides a convenient, enjoyable, professional, and extremely
effective way to make new friends.
<br><br>
>From the moment you arrive at <a href="http://www.udate.com" target="_blank">http://www.udate.com</a> you know this is a very
special site. Right on the home page, the English language search feature
quickly lets you interrogate the 1 million member database to see a
selection of members who meet your exact requirements. You can return time
and time again to search without even registering. You only need to register
when you decide you want to use the full system and to communicate with
other members.
<br><br>
Udate.com (NASD-OTCBB: UDAT) offers 2 weeks full free membership to those
who register and complete their profile. Udate allows you to remain
anonymous at all times putting you firmly in control, allowing you to
choose, if, and when to reveal your identity to the person or persons you
wish to meet.
<br><br>
Udate (<a href="http://www.udate.com" target="_blank">http://www.udate.com</a>) is a fun place to visit. There are always
thousands of members online. It's a great place to socialize and meet
fantastic people. You will be amazed at how easy it is to use, and just how
many people have been waiting for someone just like you.
<br><br>
So, come join the fun or do a friend a favor and tell them about Udate.com,
where members choose their friends from more than a million people. Join
Udate.com, and you too, can be one in a million!
<br><br>
Thanks, for your time, and good luck.
<br><br><br>
Adam Goodman<br>
Customer Services<br>
Udate.com, Inc.<br>
NASD-OTCBB: UDAT<br>
<a href="http://corporate.udate.com" target="_blank">http://corporate.udate.com</a></blockquote>
<br>

<font size="-1">If at any time you would like to remove yourself from this list please click ( <a href="mailto: remove@monsterhut.com? Subject=Remove">remove@monsterhut.com</a> ) and you will never receive any more promotional emails from us.  Thank you.</font>
	</td>
</tr>
</table>
<body>



</body>
</html>


From news@corpeast.baynetworks.com Sat Dec 09 20:47:26 2000
Received: from sprettur.isnet.is ([193.4.58.19])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 144vaH-0000gX-00
	for <bug-bash@prep.ai.mit.edu>; Sat, 09 Dec 2000 20:47:26 -0500
Received: from lobster.baynetworks.com (ns3.BayNetworks.COM [192.32.253.3])
	by sprettur.isnet.is (8.11.1/8.11.0/isnet) with ESMTP id eBA1lMD21923
	for <gnu-bash-bug@moderators.isc.org>; Sun, 10 Dec 2000 01:47:22 GMT
	(envelope-from news@corpeast.BayNetworks.COM)
Received: from mailhost.BayNetworks.COM (ns3.baynetworks.com [132.245.204.12])
	by lobster.baynetworks.com (8.9.1/8.9.1) with ESMTP id UAA03796
	for <gnu-bash-bug@moderators.isc.org>; Sat, 9 Dec 2000 20:52:24 -0500 (EST)
Received: from mailhost.corpeast.BayNetworks.COM (ns3.corpeast.baynetworks.com [132.245.135.91])
	by mailhost.BayNetworks.COM (8.9.1/8.8.8) with ESMTP id UAA07423
	for <gnu-bash-bug@moderators.isc.org>; Sat, 9 Dec 2000 20:47:15 -0500 (EST)
Received: from spinner.corpeast (spinner.corpeast.baynetworks.com [132.245.135.88])
	by mailhost.corpeast.BayNetworks.COM (SMI-8.6/BNET-97/05/05-S) with SMTP
	id UAA04730; Sat, 9 Dec 2000 20:47:13 -0500
	for <gnu-bash-bug@moderators.isc.org>
Received: by spinner.corpeast (SMI-8.6/SMI-SVR4)
	id UAA07122; Sat, 9 Dec 2000 20:47:14 -0500
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: "Paul D. Smith" <psmith@gnu.org>
Newsgroups: gnu.bash.bug
Subject: Re: GNU mirrors (was: Is bash still being actively developed?)
Date: 09 Dec 2000 20:47:13 -0500
Organization: GNU's Not Unix!
Lines: 32
Message-ID: <p5vgstjbdq.fsf@lemming.engeast.baynetworks.com>
References: <eqf23ts0ofsomqp51tlqjr3i5fgovsag65@4ax.com> <p5zoi61o8k.fsf@lemming.engeast.baynetworks.com> <mk233ts14i083sr549bu8ip6ss1c8l8lf2@4ax.com>
Reply-To: psmith@gnu.org
NNTP-Posting-Host: lemming.engeast.baynetworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: spinner.corpeast.baynetworks.com 976412833 6008 192.32.150.127 (10 Dec 2000 01:47:13 GMT)
X-Complaints-To: usenet@spinner.corpeast.baynetworks.com
NNTP-Posting-Date: 10 Dec 2000 01:47:13 GMT
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by sprettur.isnet.is id eBA1lMD21923
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/>

%% mathias@koerber.org (Mathias K=F6rber) writes:

  mk> On 08 Dec 2000 18:34:35 -0500, "Paul D. Smith" <psmith@gnu.org> wro=
te:
  >> %% mathias@koerber.org (Mathias K=F6rber) writes:
  >>=20
  mk> The latest version on the GNU sites seems to be 2.03 from Feb 1999.
  >>=20
  >> What GNU sites are those?  At the official site (ftp.gnu.org) you'll
  >> find many versions more recent than that.

  mk> ftp.gnu.org was full (too many users), so I went to one of the
  mk> officially listed mirrors (labrea.stanford.edu) and it ends
  mk> at 2.03...

You're right; note that the dates on all the files in the directory are
a year or more old...

  mk> Another listed mirror (ftp.hawaii.edu) does not seem to have
  mk> a mirrors directory anymore at all) :-(

Yuck.

You should email gnu@gnu.org about these problems.

Personally, I usually use gatekeeper for a mirror; they don't always
have the up-to-the-minute stuff but they are usually pretty up to date.

--=20
-------------------------------------------------------------------------=
------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gma=
ke/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scie=
ntist


From xs24@netease.com Sun Dec 10 20:06:04 2000
Received: from ipvpn037076.netvigator.com ([203.198.46.76] helo=hkghccies1.corp.conradintl.com.hk)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 145HPn-0008Ae-00; Sun, 10 Dec 2000 20:06:03 -0500
To: <Undisclosed Recipients>
From: xs24@netease.com
Subject: Stealth Mass Mailer, 10 Million E-Addresses & More..                         6005
Date: Sun, 10 Dec 2000 17:47:30 -0700
MIME-Version: 1.0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Reply-To: xs24@netease.com
Message-Id: <E145HPn-0008Ae-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>
<BODY>

<FONT face=3D"MS Sans Serif">
<FONT size=3D2> Email advertising WORKS!<BR>
Email Advertise your product or website to millions for only $99.<BR>
<BR>
For $99.00 you will receive the Stealth Mass Mailer Software,<BR>
List Manager, Over 10 million email addresses, and as a free bonus, <BR>
a Bulletproof mail server to send your mail through. <BR>
NEVER, lose your ISP service again. <BR>
<BR>
For more info, just respond to this message, with "$99 Special" in the<BR>
subject line.  Reply to:  xs24@netease.com<BR>
<BR>
To be removed from our mail list, reply with "Remove" in subject line.<BR>
<BR>
</FONT></FONT>
</BODY>
</HTML>




From xs24@netease.com Sun Dec 10 21:02:38 2000
Received: from ipvpn037076.netvigator.com ([203.198.46.76] helo=hkghccies1.corp.conradintl.com.hk)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 145IIW-0001WR-00; Sun, 10 Dec 2000 21:02:36 -0500
To: <Undisclosed Recipients>
From: xs24@netease.com
Subject: 10 Million E-Addresses, Stealth Mass Mailer & More..                         16925
Date: Sun, 10 Dec 2000 18:43:16 -0700
MIME-Version: 1.0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Reply-To: xs24@netease.com
Message-Id: <E145IIW-0001WR-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>
<BODY>

<FONT face=3D"MS Sans Serif">
<FONT size=3D2> Email advertising WORKS!<BR>
Email Advertise your product or website to millions for only $99.<BR>
<BR>
For $99.00 you will receive the Stealth Mass Mailer Software,<BR>
List Manager, Over 10 million email addresses, and as a free bonus, <BR>
a Bulletproof mail server to send your mail through. <BR>
NEVER, lose your ISP service again. <BR>
<BR>
For more info, just respond to this message, with "$99 Special" in the<BR>
subject line.  Reply to:  xs24@netease.com<BR>
<BR>
To be removed from our mail list, reply with "Remove" in subject line.<BR>
<BR>
</FONT></FONT>
</BODY>
</HTML>




From chet@granite.ins.cwru.edu Mon Dec 11 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 145UQu-0004rN-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 11 Dec 2000 10:00:04 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA06328; Mon, 11 Dec 2000 10:00:01 -0500 (EST) (from chet)
Message-Id: <200012111500.KAA06328@granite.INS.CWRU.Edu>
Date: Mon, 11 Dec 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 news@cscnews.csc.calpoly.edu Mon Dec 11 12:55:45 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 145XAu-0006sR-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Mon, 11 Dec 2000 12:55:44 -0500
Received: by cscnews.csc.calpoly.edu (8.9.3/8.9.3) id KAA20649;
	Mon, 11 Dec 2000 10:15:33 -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: setenv & unsetenv
Date: 11 Dec 2000 18:15:31 GMT
Organization: Cal Poly State University, San Luis Obispo
Lines: 5
Message-ID: <9135k3$k55$1@cscnews.csc.calpoly.edu>
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/>

I was given a script to set environment variable to 
then run an application.  It contains the c-shell
variable setenv and unsetenv.

Are there bash equivalents?


From chet@nike.ins.cwru.edu Mon Dec 11 13:34:50 2000
Received: from garnet.ins.cwru.edu ([129.22.8.233])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 145Xmj-0008Am-00
	for <bug-bash@gnu.org>; Mon, 11 Dec 2000 13:34:50 -0500
Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by garnet.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id NAA14363; Mon, 11 Dec 2000 13:34:46 -0500 (EST) (from chet@nike.ins.cwru.edu)
Date: Mon, 11 Dec 2000 13:33:55 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: cmcollin@monet.artisan.calpoly.edu
Subject: Re: setenv & unsetenv
Cc: chet@nike.ins.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001211183355.AA81264.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 cmcollin@monet.artisan.calpoly.edu of 11 Dec 2000 18:15:31 GMT (id <9135k3$k55$1@cscnews.csc.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/>

> I was given a script to set environment variable to 
> then run an application.  It contains the c-shell
> variable setenv and unsetenv.
> 
> Are there bash equivalents?

variable assignment, `export', and `unset'.  Look at
examples/functions/csh-compat in the bash distribution.

-- 
``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 netnews+@cantaloupe.srv.cs.cmu.edu Mon Dec 11 15:12:25 2000
Received: from cantaloupe.srv.cs.cmu.edu ([128.2.206.47])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 145ZJA-0005ki-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Mon, 11 Dec 2000 15:12:24 -0500
To: gnu-bash-bug@prep.ai.mit.edu
Path: post.ices.cmu.edu!golova+
From: Dmitriy Golovashkin <golova+@cs.cmu.edu>
Newsgroups: gnu.bash.bug
Subject: cygnus Bash shopt -s checkwinsize
Date: Mon, 11 Dec 2000 15:11:59 -0500
Organization: Carnegie Mellon Univ. -- Computer Science Dept.
Lines: 16
Message-ID: <Pine.SOL.3.95L.1001211151012.16804A-100000@post.ices.cmu.edu>
NNTP-Posting-Host: post.ices.cmu.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: cantaloupe.srv.cs.cmu.edu 976565535 16228 128.2.205.86 (11 Dec 2000 20:12:15 GMT)
X-Complaints-To: postmaster@cs.cmu.edu
NNTP-Posting-Date: 11 Dec 2000 20:12:15 GMT
X-Sender: golova+@post.ices.cmu.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/>

Dear All,

I have cygnus Bash (win nt) 2.04 and, apparently,
shopt -s checkwinsize
does  not   work:  "LINES"  and  "COLUMNS"   stay  the  same
unconditionally.  Is it  a windoze port bug, or  may be I am
doing  something wrong?  Besides,  those parameters  are not
seen in a script  (non-interactive Bash)... is there any way
to get'em?

Thank you.

Best regards,
  DVG




From news@news.ox.ac.uk Tue Dec 12 07:27:00 2000
Received: from moderated.news.pipex.net ([158.43.192.79])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 145oWK-0002jv-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 12 Dec 2000 07:27:00 -0500
Received: (qmail 8423 invoked by alias); 12 Dec 2000 12:26:58 -0000
Received: (qmail 8419 invoked from network); 12 Dec 2000 12:26:57 -0000
Received: from oxmail4.ox.ac.uk (HELO oxmail.ox.ac.uk) (163.1.2.33)
  by moderated.news.pipex.net with SMTP; 12 Dec 2000 12:26:57 -0000
Received: from news.ox.ac.uk ([163.1.2.7])
	by oxmail.ox.ac.uk with esmtp (Exim 3.12 #1)
	id 145oWG-0004K9-00
	for gnu-bash-bug@moderators.isc.org; Tue, 12 Dec 2000 12:26:56 +0000
Received: (from news@localhost) by news.ox.ac.uk (1.2/8.6.12) id MAA25474 for gnu-bash-bug@moderators.isc.org; Tue, 12 Dec 2000 12:26:25 GMT
To: gnu-bash-bug@moderators.isc.org
Path: njh
From: neil.hoggarth@physiol.ox.ac.uk (Neil Hoggarth)
Newsgroups: gnu.bash.bug
Subject: Re: setenv & unsetenv
Date: 12 Dec 2000 12:26:24 GMT
Organization: University Laboratory of Physiology, Oxford
Lines: 26
Message-ID: <9155hg$os0$1@news.ox.ac.uk>
References: <9135k3$k55$1@cscnews.csc.calpoly.edu>
NNTP-Posting-Host: hal.physiol.ox.ac.uk
X-Trace: news.ox.ac.uk 976623984 25472 163.1.249.107 (12 Dec 2000 12:26:24 GMT)
X-Complaints-To: newsmaster@ox.ac.uk
NNTP-Posting-Date: 12 Dec 2000 12:26: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.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 <9135k3$k55$1@cscnews.csc.calpoly.edu>,
Christopher Michael Collins ( <cmcollin@monet.artisan.calpoly.edu> wrote:

> I was given a script to set environment variable to 
> then run an application.  It contains the c-shell
> variable setenv and unsetenv.
> 
> Are there bash equivalents?

VARIABLE = value
export VARIABLE

or

export VARIABLE = value

(the former syntax should work with all similar shells, so if your
script needs to be portable to /bin/sh on a range of systems you
should stick with that - if the script can be Bash specific then you
can use the latter shortcut).

Regards,
-- 
Neil Hoggarth                                 Departmental Computer Officer
<neil.hoggarth@physiol.ox.ac.uk>                   Laboratory of Physiology
http://www.physiol.ox.ac.uk/~njh/                  University of Oxford, UK


From schwab@suse.de Tue Dec 12 09:03:59 2000
Received: from cantor.suse.de ([194.112.123.193])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 145q2A-0006Im-00
	for <bug-bash@gnu.org>; Tue, 12 Dec 2000 09:03:58 -0500
Received: from Hermes.suse.de (Hermes.suse.de [194.112.123.136])
	by Cantor.suse.de (Postfix) with ESMTP
	id 8589C1E120; Tue, 12 Dec 2000 15:03:56 +0100 (MET)
Received: from Wotan.suse.de (Wotan.suse.de [10.10.0.1])
	by Hermes.suse.de (Postfix) with ESMTP
	id 6ACA03E452; Tue, 12 Dec 2000 15:03:56 +0100 (MET)
Received: from hawking.suse.de (Hawking.suse.de [10.10.0.89])
	by Wotan.suse.de (Postfix) with ESMTP
	id 552601C8259; Tue, 12 Dec 2000 15:03:56 +0100 (CET)
Received: (from schwab@localhost)
	by hawking.suse.de (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id eBCE3ta17912;
	Tue, 12 Dec 2000 15:03:55 +0100
X-Authentication-Warning: hawking.suse.de: schwab set sender to schwab@suse.de using -f
To: neil.hoggarth@physiol.ox.ac.uk (Neil Hoggarth)
Cc: bug-bash@gnu.org
Subject: Re: setenv & unsetenv
References: <9135k3$k55$1@cscnews.csc.calpoly.edu>
	<9155hg$os0$1@news.ox.ac.uk>
X-Yow: I'm meditating on the FORMALDEHYDE and the ASBESTOS leaking into my
 PERSONAL SPACE!!
From: Andreas Schwab <schwab@suse.de>
Date: 12 Dec 2000 15:03:55 +0100
In-Reply-To: <9155hg$os0$1@news.ox.ac.uk>
Message-ID: <jepuixrb1w.fsf@hawking.suse.de>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.93
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
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/>

neil.hoggarth@physiol.ox.ac.uk (Neil Hoggarth) writes:

|> In article <9135k3$k55$1@cscnews.csc.calpoly.edu>,
|> Christopher Michael Collins ( <cmcollin@monet.artisan.calpoly.edu> wrote:
|> 
|> > I was given a script to set environment variable to 
|> > then run an application.  It contains the c-shell
|> > variable setenv and unsetenv.
|> > 
|> > Are there bash equivalents?
|> 
|> VARIABLE = value
           ^ ^
Remove the whitespace, it must be one word.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


From neil.hoggarth@physiol.ox.ac.uk Tue Dec 12 09:13:46 2000
Received: from oxmail2.ox.ac.uk ([163.1.2.1] helo=oxmail.ox.ac.uk)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 145qBd-0006pJ-00
	for <bug-bash@gnu.org>; Tue, 12 Dec 2000 09:13:45 -0500
Received: from willis.physiol.ox.ac.uk ([163.1.248.153])
	by oxmail.ox.ac.uk with esmtp (Exim 3.12 #1)
	id 145qBb-0004JZ-00; Tue, 12 Dec 2000 14:13:43 +0000
Received: from hal.physiol (hal.physiol [163.1.249.107])
	by willis.physiol.ox.ac.uk (8.8.8/8.8.5) with ESMTP id OAA14165;
	Tue, 12 Dec 2000 14:13:43 GMT
Date: Tue, 12 Dec 2000 14:13:42 +0000 (GMT)
From: Neil Hoggarth <neil.hoggarth@physiol.ox.ac.uk>
X-X-Sender:  <njh@hal.physiol>
To: Andreas Schwab <schwab@suse.de>
cc: <bug-bash@gnu.org>
Subject: Re: setenv & unsetenv
In-Reply-To: <jepuixrb1w.fsf@hawking.suse.de>
Message-ID: <Pine.GSO.4.31.0012121412010.13408-100000@hal.physiol>
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/>

On 12 Dec 2000, Andreas Schwab wrote:

> neil.hoggarth@physiol.ox.ac.uk (Neil Hoggarth) writes:
>
> |> VARIABLE = value
>            ^ ^
> Remove the whitespace, it must be one word.

Oops. Well spotted - thanks for the correction. I think I've been
writing too much Perl recently ... :-)

Regards,
-- 
Neil Hoggarth                                 Departmental Computer Officer
<neil.hoggarth@physiol.ox.ac.uk>                   Laboratory of Physiology
http://www.physiol.ox.ac.uk/~njh/                  University of Oxford, UK



From chet@nike.ins.cwru.edu Tue Dec 12 10:42:08 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 145rZA-0001Iz-00
	for <bug-bash@gnu.org>; Tue, 12 Dec 2000 10:42:08 -0500
Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id KAA26718; Tue, 12 Dec 2000 10:41:53 -0500 (EST) (from chet@nike.ins.cwru.edu)
Date: Tue, 12 Dec 2000 10:41:08 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: neil.hoggarth@physiol.ox.ac.uk
Subject: Re: setenv & unsetenv
Cc: chet@nike.ins.cwru.edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001212154108.AA01426.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 neil.hoggarth@physiol.ox.ac.uk of 12 Dec 2000 12:26:24 GMT (id <9155hg$os0$1@news.ox.ac.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/>

> In article <9135k3$k55$1@cscnews.csc.calpoly.edu>,
> Christopher Michael Collins ( <cmcollin@monet.artisan.calpoly.edu> wrote:
> 
> > I was given a script to set environment variable to 
> > then run an application.  It contains the c-shell
> > variable setenv and unsetenv.
> > 
> > Are there bash equivalents?
> 
> VARIABLE = value

That should be

VARIABLE=value

> export VARIABLE = value

This should be

export VARIABLE=value

No whitespace is permitted around the `='.

-- 
``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 ckerr@atlas.otago.ac.nz Tue Dec 12 22:04:47 2000
Received: from atlas.otago.ac.nz ([139.80.32.250])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1462Dm-0002nF-00
	for <bug-bash@gnu.org>; Tue, 12 Dec 2000 22:04:46 -0500
Received: from atlas.otago.ac.nz (IDENT:ckerr@iridium.otago.ac.nz [139.80.32.82])
	by atlas.otago.ac.nz (8.9.3/8.9.3) with ESMTP id QAA15100
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 16:04:39 +1300 (NZDT)
Message-ID: <3A36E747.4E33760C@atlas.otago.ac.nz>
Date: Wed, 13 Dec 2000 16:04:39 +1300
From: Cameron Kerr <ckerr@atlas.otago.ac.nz>
Organization: University of Otago
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org
Subject: Bug with newline in prompt
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/>

GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)
Copyright 1999 Free Software Foundation, Inc.

PS1=${bold}\h:\u \w\$\n${unbold}\$

Where ${bold} and ${unbold} are from setterm -bold on and setterm -bold
off

Problem: when typing past write margin (in xterms and console) text will
wrap
around itself rather than onto the next line. This behaivious is
different to 
when PS1 is without the \n

-- 
------------------------------------------------
Cameron Kerr     email: ckerr@cs.otago.ac.nz
Computer Science Department, University of Otago 
------------------------------------------------


From j-okajim@nskli014.nsk.nis.nec.co.jp Wed Dec 13 06:28:41 2000
Received: from tyo202.gate.nec.co.jp ([202.247.6.41])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146A5Q-0007vZ-00
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 06:28:40 -0500
Received: from mailgate1.nec.co.jp (mailgate51 [10.7.69.190])
	by TYO202.gate.nec.co.jp (8.9.3/3.7W00121312) with ESMTP id UAA07560
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:38 +0900 (JST)
Received: from mailsv3.nec.co.jp (localhost [127.0.0.1]) by mailgate1.nec.co.jp (8.9.3/3.7W-MAILGATE-NEC) with ESMTP
	id UAA14319 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:36 +0900 (JST)
Received: from ngw1.nsk.nis.nec.co.jp (IDENT:root@ngw1.nsk.nis.nec.co.jp [10.17.112.1]) by mailsv3.nec.co.jp (8.9.3/3.7W-MAILSV3-NEC) with ESMTP
	id UAA27546 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:22 +0900 (JST)
Received: from gw1.nsk.nis.nec.co.jp (IDENT:root@gw1 [10.17.113.1])
	by ngw1.nsk.nis.nec.co.jp (8.9.3/3.7W-nsk-ngw1) with ESMTP id UAA26095
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:21 +0900
Received: from nskli014.nsk.nis.nec.co.jp (nskli014 [10.17.115.79])
	by gw1.nsk.nis.nec.co.jp (8.9.3/3.7W-nsk-gw1) with ESMTP id UAA12349
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:21 +0900
Received: from j-okajim by nskli014.nsk.nis.nec.co.jp (3.14) id 146A57-0002z9-00 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:28:21 +0900
To: bug-bash@gnu.org
Subject: [50 character or so descriptive subject here (for reference)]
From: Junjiro Okajima <j-okajim@nskli014.nsk.nis.nec.co.jp>
Message-Id: <E146A57-0002z9-00@nskli014.nsk.nis.nec.co.jp>
Date: Wed, 13 Dec 2000 20:28:21 +0900
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: 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/home/swt/doko/export/packages/bash/bash-2.03 -I/home/swt/doko/export/packages/bash/bash-2.03/lib -I/usr/include -g -O2
uname output: Linux nskli014 2.2.16 #5 SMP Tue Sep 19 23:42:25 JST 2000 i686 unknown
Machine Type: i386-pc-linux-gnu

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

Description:

I found a problem in bash-2.03. And it seems to be the same in
bash-2.04 to me who read the source of 2.04.

The problem is a script such like this, waits for "background
long_task" finishes.
----------------------------------------
#!/bin/bash -

# this command takes a long time,
# so running in background.
long_task &

# this command can exit as soon as possible.
short_task

# the return value is "short_task"s.
exit $?
----------------------------------------

I read the source codes of bash 2.03 and understands,

o execute_disk_command("long_task &") does,
- fork() and unblock SIGCHLD by make_child(), 
- execve() by shell_execve().
and does NOT wait, of course.

o execute_disk_command("short_task") does,
- fork() and unblock SIGCHLD by make_child(), 
- execve() by shell_execve().
and
- waitpid/wait4() for any child process by waitchld() in wait_for().

o SIGCHLD handler sigchld_handler() calls waitchld().

I guess there is a wait race condition. Under the very high load
average system, bash will be sent SIGCHLD before he does
wait_for(). After the sigchld_handler() who waits for "short_task",
bash will call wait_for() to wait for "long_task".


And there will be another phenomenon. If the "long_task" exit() before
"short_task", the return value $? of "short_task" will be "long_task"s
one.


Is my understaing is right? And will you fix this problem?
I hope so.
Thank you.

----------------------------------------------------------------------
o in the case of bash waits for background job
        
 <bash>
   |
   |
  fork()-------------------------------+
   |                                   |
   |                          exec("long_task")
  fork()-------------------+           |
   |                       |           |
   |                       |           |
   |               exec("short_task")  |
   |                       |           |
   |                       |           |
   |<----------SIGCHLD-- exit()        |
   +-------->+             :           |
       sigchld_handler()   :           |
             |             :           |
             |             :           |
             |             :           |
           wait()--------->X           |
             |                         |
             |                         |
   +<--------+                         |
   |                                   |
   |                                   |
   |                                   |
   |                                   |
  wait()..............................>|
                                       |
                                       |
                                       |
                                       |
                                       V

o in the case of "long_task" exits faster

 <bash>
   |
   |
  fork()-------------------------------+
   |                                   |
   |                          exec("long_task")
  fork()-------------------+           |
   |                       |           |
   |                       |           |
   |               exec("short_task")  |
   |                       |           |
   |                       |           |
  wait()                   |           |
   :                       |           |
   :                       |           |
   :                       |           |
   :<----------SIGCHLD-------------- exit(1)
   |                       |
   |                       |
   |                       |
  exit()                   |
                           |
                           |
                           |
    /etc/init <--SIGCHLD--exit(0)
----------------------------------------------------------------------


Repeat-By:
	It is very difficult, since this race problem will occur only
	under the high load average. It is needed to task
	switch/dispath to "short_task" happen between the execve() and
	wait of the bash.

Fix:
	How about,,,
	- Only sigchld_hanlder does wait.
	- it is done by specifying child pid.
	- pids of children are to be managed.


From j-okajim@nskli014.nsk.nis.nec.co.jp Wed Dec 13 06:52:43 2000
Received: from tyo202.gate.nec.co.jp ([202.247.6.41])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146ASg-0008IP-00
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 06:52:42 -0500
Received: from mailgate2.nec.co.jp (mailgate52 [10.7.69.191])
	by TYO202.gate.nec.co.jp (8.9.3/3.7W00121312) with ESMTP id UAA15955
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:52:40 +0900 (JST)
Received: from mailsv3.nec.co.jp (localhost [127.0.0.1]) by mailgate2.nec.co.jp (8.9.3/3.7W-MAILGATE-NEC) with ESMTP
	id UAA18559 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:52:39 +0900 (JST)
Received: from ngw1.nsk.nis.nec.co.jp (IDENT:root@ngw1.nsk.nis.nec.co.jp [10.17.112.1]) by mailsv3.nec.co.jp (8.9.3/3.7W-MAILSV3-NEC) with ESMTP
	id UAA06727 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:51:06 +0900 (JST)
Received: from gw1.nsk.nis.nec.co.jp (IDENT:root@gw1 [10.17.113.1])
	by ngw1.nsk.nis.nec.co.jp (8.9.3/3.7W-nsk-ngw1) with ESMTP id UAA26449
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:51:06 +0900
Received: from nskli014.nsk.nis.nec.co.jp (nskli014 [10.17.115.79])
	by gw1.nsk.nis.nec.co.jp (8.9.3/3.7W-nsk-gw1) with ESMTP id UAA12656
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:51:06 +0900
Received: from j-okajim by nskli014.nsk.nis.nec.co.jp (3.14) id 146AR8-00032A-00 for <bug-bash@gnu.org>; Wed, 13 Dec 2000 20:51:06 +0900
To: bug-bash@gnu.org
Subject: wait race
From: Junjiro Okajima <j-okajim@nskli014.nsk.nis.nec.co.jp>
Message-Id: <E146AR8-00032A-00@nskli014.nsk.nis.nec.co.jp>
Date: Wed, 13 Dec 2000 20:51:06 +0900
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: 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/home/swt/doko/export/packages/bash/bash-2.03 -I/home/swt/doko/export/packages/bash/bash-2.03/lib -I/usr/include -g -O2
uname output: Linux nskli014 2.2.16 #5 SMP Tue Sep 19 23:42:25 JST 2000 i686 unknown
Machine Type: i386-pc-linux-gnu

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

Description:

I found a problem in bash-2.03. And it seems to be the same in
bash-2.04 to me who read the source of 2.04.

The problem is a script such like this, waits for "background
long_task" finishes.
----------------------------------------
#!/bin/bash -

# this command takes a long time,
# so running in background.
long_task &

# this command can exit as soon as possible.
short_task

# the return value is "short_task"s.
exit $?
----------------------------------------

I read the source codes of bash 2.03 and understands,

o execute_disk_command("long_task &") does,
- fork() and unblock SIGCHLD by make_child(),
- execve() by shell_execve().
and does NOT wait, of course.

o execute_disk_command("short_task") does,
- fork() and unblock SIGCHLD by make_child(),
- execve() by shell_execve().
and
- waitpid/wait4() for any child process by waitchld() in wait_for().

o SIGCHLD handler sigchld_handler() calls waitchld().

I guess there is a wait race condition. Under the very high load
average system, bash will be sent SIGCHLD before he does
wait_for(). After the sigchld_handler() who waits for "short_task",
bash will call wait_for() to wait for "long_task".

And there will be another phenomenon. If the "long_task" exit() before
"short_task", the return value $? of "short_task" will be "long_task"s
one.


Is my understaing is right? And will you fix this problem?
I hope so.
Thank you.

----------------------------------------------------------------------
o in the case of bash waits for background job

 <bash>
   |
   |
  fork()-------------------------------+
   |                                   |
   |                          exec("long_task")
  fork()-------------------+           |
   |                       |           |
   |                       |           |
   |               exec("short_task")  |
   |                       |           |
   |                       |           |
   |<----------SIGCHLD-- exit()        |
   +-------->+             :           |
       sigchld_handler()   :           |
             |             :           |
             |             :           |
             |             :           |
           wait()--------->X           |
             |                         |
             |                         |
   +<--------+                         |
   |                                   |
   |                                   |
   |                                   |
   |                                   |
  wait()..............................>|
                                       |
                                       |
                                       |
                                       |
                                       V

o in the case of "long_task" exits faster

 <bash>
   |
   |
  fork()-------------------------------+
   |                                   |
   |                          exec("long_task")
  fork()-------------------+           |
   |                       |           |
   |                       |           |
   |               exec("short_task")  |
   |                       |           |
   |                       |           |
  wait()                   |           |
   :                       |           |
   :                       |           |
   :                       |           |
   :<----------SIGCHLD-------------- exit(1)
   |                       |
   |                       |
   |                       |
  exit()                   |
                           |
                           |
                           |
    /etc/init <--SIGCHLD--exit(0)
----------------------------------------------------------------------

PS.
A few months before, I have reported a problem about an errno in a signal handler.
And I found it is fixed in bash 2.04. Thank you very much.

Repeat-By:
        It is very difficult, since this race problem will occur only
        under the high load average. It is needed to task
        switch/dispath to "short_task" happen between the execve() and
        wait of the bash.

Fix:
        How about,,,
        - Only sigchld_hanlder does wait.
        - it is done by specifying child pid.
        - pids of children are to be managed.


From gillg@nortelnetworks.com Wed Dec 13 11:46:03 2000
Received: from ertpg14e1.nortelnetworks.com ([47.234.0.35])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 146F2Z-0002yZ-00
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 11:46:03 -0500
Received: from rftzy228.ca.nortel.com (actually rftzy228) 
          by ertpg14e1.nortelnetworks.com; Wed, 13 Dec 2000 11:44:58 -0500
Received: by rftzy228.ca.nortel.com with Internet Mail Service (5.5.2652.35) 
          id <YF5X0ZRY>; Wed, 13 Dec 2000 11:44:57 -0500
Message-ID: <E30BF4611184D4118AD20000F81AE9065624E2@rftzy232.ca.nortel.com>
From: "Gurmeet Gill" <gillg@nortelnetworks.com>
To: "'bug-bash@gnu.org'" <bug-bash@gnu.org>
Subject: schedule command for a bash script
Date: Wed, 13 Dec 2000 11:43:37 -0500
Importance: high
X-Priority: 1
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2652.35)
Content-Type: multipart/alternative;
              boundary="----_=_NextPart_001_01C06523.D731CDC0"
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/>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C06523.D731CDC0
Content-Type: text/plain

Hello,
I have written a bash script to automate my build process and now i want to
schedule this task. I am trying to use at command, which does not seem to
work. I am using the following syntax: at 10:43AM ls 
when i hit enter i get this line: Added a new job with job ID = 1

And if i print at to see the status i see following line:
 bash-2.02$ at
Status ID   Day                     Time          Command Line
----------------------------------------------------------------------------
---
        1   Next 14                 10:48 AM      ls
bash-2.02$ at 10:48AM "bash ls"
Added a new job with job ID = 2
bash-2.02$ at
Status ID   Day                     Time          Command Line
----------------------------------------------------------------------------
---
        1   Next 14                 10:48 AM      ls
        2   Next 14                 10:48 AM      "bash ls"
bash-2.02$ at 10:49AM "bash ls"
Added a new job with job ID = 3
bash-2.02$ at 3

Task ID:       3
Status:        OK
Schedule:      Next 14
Time of day:   10:49 AM
Interactive:   No
Command:       "bash ls"  ( i also tried ls without bash and without quotes)

why it's not working for me. Is my syntax o.k. Please help.

Thanks,
Gurmeet Kaur Gill
Software Build Prime
Wireless e-Mobility Solutions, Nortel Networks
Ph. (905)863-1097 ESN 333
Email gillg@nortelnetworks.com


------_=_NextPart_001_01C06523.D731CDC0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>schedule command for a bash script</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hello,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I have written a bash script to =
automate my build process and now i want to schedule this task. I am =
trying to use at command, which does not seem to work. I am using the =
following syntax: at 10:43AM ls </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">when i hit enter i get this line: =
Added a new job with job ID =3D 1</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">And if i print at to see the status i =
see following line:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;bash-2.02$ at</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Status ID&nbsp;&nbsp; =
Day&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command =
Line</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=
----------------------</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; =
Next =
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; 10:48 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ls</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ at 10:48AM &quot;bash =
ls&quot;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Added a new job with job ID =3D =
2</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ at</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Status ID&nbsp;&nbsp; =
Day&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command =
Line</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=
----------------------</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; =
Next =
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; 10:48 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ls</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; =
Next =
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; 10:48 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&quot;bash ls&quot;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ at 10:49AM &quot;bash =
ls&quot;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Added a new job with job ID =3D =
3</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.02$ at 3</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Task =
ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">Status:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
OK</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">Schedule:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next 14</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Time of day:&nbsp;&nbsp; 10:49 =
AM</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Interactive:&nbsp;&nbsp; No</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">Command:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;bash =
ls&quot;&nbsp; ( i also tried ls without bash and without =
quotes)</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">why it's not working for me. Is my =
syntax o.k. Please help.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>
<BR><B><FONT COLOR=3D"#800080" SIZE=3D2 FACE=3D"Verdana">Gurmeet Kaur =
Gill</FONT></B>
<BR><FONT COLOR=3D"#008080" SIZE=3D1 FACE=3D"Verdana">Software Build =
Prime</FONT>
<BR><FONT COLOR=3D"#008080" SIZE=3D1 FACE=3D"Verdana">Wireless =
e-Mobility Solutions, Nortel Networks</FONT>
<BR><FONT COLOR=3D"#008080" SIZE=3D1 FACE=3D"Verdana">Ph. (905)863-1097 =
ESN 333</FONT>
<BR><FONT COLOR=3D"#008080" SIZE=3D1 FACE=3D"Verdana">Email =
gillg@nortelnetworks.com</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C06523.D731CDC0--


From chet@nike.ins.cwru.edu Wed Dec 13 16:03:10 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 146J3I-0006Lw-00
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 16:03:05 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id QAA04494; Wed, 13 Dec 2000 16:02:29 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 13 Dec 2000 16:01:22 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: ckerr@atlas.otago.ac.nz
Subject: Re: Bug with newline in prompt
Cc: chet@nike.INS.CWRU.Edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001213210122.AA52900.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 ckerr@atlas.otago.ac.nz of Wed, 13 Dec 2000 16:04:39 +1300 (id <3A36E747.4E33760C@atlas.otago.ac.nz>)
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/>

> GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)
> Copyright 1999 Free Software Foundation, Inc.
> 
> PS1=${bold}\h:\u \w\$\n${unbold}\$
> 
> Where ${bold} and ${unbold} are from setterm -bold on and setterm -bold
> off

First, you need to bracket the sequences of unprintable characters in
your prompt string with \[ and \].  Look at the bash FAQ, question E3.

-- 
``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 Dec 13 17:04:45 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 146K0z-000092-00
	for <bug-bash@gnu.org>; Wed, 13 Dec 2000 17:04:45 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id RAA25171; Wed, 13 Dec 2000 17:04:01 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 13 Dec 2000 16:17:06 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: j-okajim@nskli014.nsk.nis.nec.co.jp
Subject: Re: [50 character or so descriptive subject here (for reference)]
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001213211706.AA52988.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 j-okajim@nskli014.nsk.nis.nec.co.jp of Wed, 13 Dec 2000 20:28:21 +0900 (id <E146A57-0002z9-00@nskli014.nsk.nis.nec.co.jp>)
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-pc-linux-gnu
> 
> Bash Version: 2.03
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> I found a problem in bash-2.03. And it seems to be the same in
> bash-2.04 to me who read the source of 2.04.
> 
> The problem is a script such like this, waits for "background
> long_task" finishes.

Thanks for your analysis.

> ----------------------------------------
> #!/bin/bash -
> 
> # this command takes a long time,
> # so running in background.
> long_task &
> 
> # this command can exit as soon as possible.
> short_task
> 
> # the return value is "short_task"s.
> exit $?
> ----------------------------------------
> 
> I read the source codes of bash 2.03 and understands,
> 
> o execute_disk_command("long_task &") does,
> - fork() and unblock SIGCHLD by make_child(), 
> - execve() by shell_execve().
> and does NOT wait, of course.
> 
> o execute_disk_command("short_task") does,
> - fork() and unblock SIGCHLD by make_child(), 
> - execve() by shell_execve().
> and
> - waitpid/wait4() for any child process by waitchld() in wait_for().

In this case, execute_simple_command calls execute_disk_command,
which calls make_child to create the child process.  The pid of the
new process is saved in last_made_pid.  execute_simple_command calls
wait_for with this PID as its argument.  It's clumsier than it needs
to be, to be sure.

wait_for finds the job and waits for all of its processes to complete.

> I guess there is a wait race condition. Under the very high load
> average system, bash will be sent SIGCHLD before he does
> wait_for(). After the sigchld_handler() who waits for "short_task",
> bash will call wait_for() to wait for "long_task".

waitchld() is responsible for setting the status of the job.  It marks
the status of the process it reaps as not running (saving the exit
status), and, if all processes in the job have exited, it marks the
job as dead.

If the SIGCHLD occurs before wait_for is called, waitchld() will already
have set the job's status.

The first thing wait_for does is check that the child is running.  If
it's not, then it simply collects its exit status.  That takes care of
one race condition.

If the SIGCHLD happens between the time that wait_for finds that the
child process is running and the time it calls waitchld(), there might
be a problem.  There's a very small window before wait_for sets
waiting_for_job to 1 and calls waitchld() that a SIGCHLD may arrive.
The SIGCHLD handler won't call waitchld() if wait_for has already called
it (they rendezvous on `waiting_for_job').

(Bash-2.05 has some minor changes here to avoid calling waitpid() when
the kernel doesn't think there are any running child processes, even
if bash does.)

> And there will be another phenomenon. If the "long_task" exit() before
> "short_task", the return value $? of "short_task" will be "long_task"s
> one.

I'm not sure that this is true.

Thanks for the message; there are definitely things to look at for
the next release after bash-2.05.


-- 
``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 JWeskaefer@aol.com Thu Dec 14 12:35:14 2000
Received: from imo-r02.mx.aol.com ([152.163.225.2])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146cHi-0006yz-00
	for <bug-bash@gnu.org>; Thu, 14 Dec 2000 12:35:14 -0500
Received: from JWeskaefer@aol.com
	by imo-r02.mx.aol.com (mail_out_v28.34.) id 7.82.43e2639 (15901)
	 for <bug-bash@gnu.org>; Thu, 14 Dec 2000 12:34:51 -0500 (EST)
Received: from  web47.aolmail.aol.com (web47.aolmail.aol.com [205.188.161.8]) by air-id09.mx.aol.com (v77.14) with ESMTP; Thu, 14 Dec 2000 12:34:51 -0500
Date: Thu, 14 Dec 2000 12:34:51 EST
From: JWeskaefer@aol.com
Subject: mksignames error with AIX
To: <bug-bash@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Mailer: Unknown
Message-ID: <82.43e2639.276a5ebb@aol.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/>

(Only e-mail access I could find)

Build Error due to segment violation in mksignames

AIX 4.3.3.0
BASH 2.4

SIGMAX is defined as 63
NSIG is defined as SIGMAX+1
SIGRTMIN is 888
SIGRTMAX is 999

this causes a problem on line 79 of support/mksignames.c
signal_names[rtmax] = ...

I just changed line 35 to 100*NSIG instead of 2*NSIG

Regards,

Wes Kaefer



From news@venus.telepac.pt Thu Dec 14 19:08:13 2000
Received: from venus.telepac.pt ([194.65.14.50])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 146iOi-0005NO-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Thu, 14 Dec 2000 19:08:12 -0500
Received: (from news@localhost)
	by venus.telepac.pt (8.10.2/8.10.2) id eBF07xC10290
	for gnu-bash-bug@prep.ai.mit.edu; Fri, 15 Dec 2000 00:07:59 GMT
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: nbsbiz@worldex.com
Newsgroups: gnu.bash.bug
Subject: High Quality Porn Site With Animals  3887
Date: 15 Dec 2000 00:07:58 GMT
Lines: 11
Message-ID: <91bncu$qmh$21381@venus.telepac.pt>
NNTP-Posting-Host: 194.65.171.21
X-Trace: venus.telepac.pt 976838878 27345 194.65.171.21 (15 Dec 2000 00:07:58 GMT)
X-Complaints-To: abuse@mail.telepac.pt
NNTP-Posting-Date: 15 Dec 2000 00:07:58 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/>

They have real bestiality photos! Not that shitty photos, that other pag sites have in their member sections - nude women standing by the animals. Only real softcore and hardcore shots!!!

More than 2500 hardcore anumal sex pictures!

JOIN NOW:
http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB

http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB

uwuqktjsfnxkcfgxnfjiheeimkbxzeytzulltgfeuvuqchncuctxythcswyemyvjptgzfsidfwojsuyfntcd



From fabio.padoa@dfn.if.usp.br Fri Dec 15 09:17:28 2000
Received: from dfn.if.usp.br ([143.107.132.197])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146vfp-0000nr-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 15 Dec 2000 09:17:26 -0500
Received: (qmail 327 invoked from network); 15 Dec 2000 13:19:54 -0000
Received: from linpel1.if.usp.br (HELO dfnsgr.if.usp.br) (143.107.132.198)
  by dfn.if.usp.br with SMTP; 15 Dec 2000 13:19:54 -0000
Received: (qmail 27170 invoked by uid 2008); 15 Dec 2000 13:22:35 -0000
Date: 15 Dec 2000 13:22:35 -0000
Message-ID: <20001215132235.27169.qmail@dfnsgr.if.usp.br>
From: fabiop@dfn.if.usp.br
To: bug-bash@prep.ai.mit.edu
Subject: Can't test "-l"
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: 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
uname output: Linux linpel1.if.usp.br 2.2.5-15 #1 Mon Apr 19 23:00:46 EDT 1999 i686 unknown

Bash Version: 1.14
Patch Level: 7

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

$ if [ "-l" != "-a" ] ; then echo "ok" ; fi
[: -a: binary operator expected                <----- ?

$ aa='-l'
$ if [ $aa != "-k" ] ; then echo "ok" ; fi
[: -k: binary operator expected                <----- ?

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 JohnLopez@vandorndemag.com Fri Dec 15 10:41:30 2000
Received: from firewall.vandorndemag.com ([208.155.225.66] helo=vandorndemag.com)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146wzC-0003WG-00
	for <bug-bash@gnu.org>; Fri, 15 Dec 2000 10:41:30 -0500
Message-Id: <sa39f558.013@vandorndemag.com>
Date: Fri, 15 Dec 2000 10:41:01 -0500
From: "John Lopez" <JohnLopez@vandorndemag.com>
To: bug-bash@gnu.org
Subject: withdrawing membership from BUG-BASH due to porn spamming
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.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 bug-bash members,

it is with regret that I must withdraw my membership from bug-bach@gnu.org =
mailing list and support network. I hope that the time that I have been a =
member that I have contributed in assisting members and inquirers solve =
problems and attain solutions. Many of you have done much more, and I hold =
you in high esteem for your intelligence, cooperation, and generosity.

However, bug-bach@gnu.org is becoming the target of increasing web based =
marketing. The ubiquitous and cooperative spirit of the Internet is being =
compromised by opurtunists. The paradigm set forth by the Free Software =
Foundation is itself being threatened within it's ranks by profiteers who =
are using the mechanisms that the FSF has set up to promote an environment =
for the advancement of cooperative software development for the benefit of =
all, to access a group of individuals that was never intended to exist as =
a market.

Further, rather than  providing value to persons within the community, we =
are recieving emails (many of us at work locations where such interactions =
would be considered grounds for dismissal)  from filth vendors who are =
attempting to turn the Internet into a global house of prostitution. While =
I am not for censorship, the degredation that is provided by "porn =
vendors" feed the sickest persons in society with the motivation that they =
need to prey on our families and particularly children. While legitimate =
pursuits require Internet resources, such filth vendors consume massive =
amounts of bandwidth in delievery of that which degrades our best purposes =
and consumes our best resources.

I would ask that the FSF and other such organizations consider a means of =
filtering such unwanted spam of unwanted marketing to their members before =
such demeans the original paradigm and mission of the organization. If you =
are in agreement, please communicate such to them.

Thank you




From chet@nike.ins.cwru.edu Fri Dec 15 11:16:03 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 146xWd-000596-00
	for <bug-bash@gnu.org>; Fri, 15 Dec 2000 11:16:03 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA29988; Fri, 15 Dec 2000 11:15:19 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Fri, 15 Dec 2000 11:14:34 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: fabiop@dfn.if.usp.br
Subject: Re: Can't test "-l"
Cc: chet@nike.INS.CWRU.Edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001215161434.AA71714.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 fabiop@dfn.if.usp.br of 15 Dec 2000 13:22:35 -0000 (id <20001215132235.27169.qmail@dfnsgr.if.usp.br>)
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: 1.14
> Patch Level: 7
> 
> Description:
>         [Detailed description of the problem, suggestion, or complaint.]
> 
> $ if [ "-l" != "-a" ] ; then echo "ok" ; fi
> [: -a: binary operator expected                <----- ?
> 
> $ aa='-l'
> $ if [ $aa != "-k" ] ; then echo "ok" ; fi
> [: -k: binary operator expected                <----- ?

Here's the relevant item from the bash-2.05 COMPAT file:

15.  Bash versions up to 1.14.7 included an undocumented `-l' operator to
     the `test/[' builtin.  It was a unary operator that expanded to the
     length of its string argument.  This let you do things like

        test -l $variable -lt 20

     for example.

     This was included for backwards compatibility with old versions of the
     Bourne shell, which did not provide an easy way to obtain the length of
     the value of a shell variable.

     This operator is not part of the POSIX standard, because one can (and
     should) use ${#variable} to get the length of a variable's value.
     Bash-2.x does not support it.

-- 
``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 prj@multivac.cwru.edu Fri Dec 15 13:38:54 2000
Received: from multivac.student.cwru.edu ([129.22.239.69] helo=multivac.cwru.edu)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 146zks-0002H5-00
	for <bug-bash@gnu.org>; Fri, 15 Dec 2000 13:38:54 -0500
Received: (qmail 1616 invoked by uid 500); 15 Dec 2000 18:39:11 -0000
Date: 15 Dec 2000 18:39:11 -0000
Message-ID: <20001215183911.1615.qmail@multivac.cwru.edu>
From: prj@po.cwru.edu (Paul Jarc)
To: bug-bash@gnu.org
Subject: bash doesn't close-on-exec if its input source is dup()ed
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: 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 multivac.student.cwru.edu 2.2.16 #1 SMP Tue Jul 18 14:44:21 EDT 2000 i686 unknown
Machine Type: i386-redhat-linux-gnu

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

Description:
	In input.c, check_bash_input() dup()s bash's input fd if the script
	tries to use that fd in a redirection.  But the new fd for bash's
	input doesn't get its close-on-exec flag set.
	This affects non-interactive shells.  For interactive shells, there
	is a different problem: if you redirect 255 (or whatever), it won't
	be dup()ed first, and something goes wrong with job control until you
	redirect 255 again back to the tty it was reading from before.  The
	rest of this report deals only with the non-interactive problem.

Repeat-By:
	#!/bin/bash -x
	ls -l /proc/$$/fd        # list bash's descriptors
	ls -l /proc/self/fd      # list those without close-on-exec
	exec 255< /dev/null      # assuming 255 is the script fd
	ls -l /proc/$$/fd        # show the new script fd
	ls -l /proc/self/fd      # the new script fd isn't inherited by kids...
	exec ls -l /proc/self/fd # but it is retained by exec

Fix:
	Around line 207 of input.c, add this line:
	SET_CLOSE_ON_EXEC(nfd);


From chet@nike.ins.cwru.edu Fri Dec 15 16:57:09 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1472qi-00010X-00
	for <bug-bash@gnu.org>; Fri, 15 Dec 2000 16:57:08 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id QAA00272; Fri, 15 Dec 2000 16:57:03 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Fri, 15 Dec 2000 16:31:52 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: bug-bash@gnu.org
Subject: Re: [50 character or so descriptive subject here (for reference)]
Cc: chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001215213152.AA80462.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 Wed, 13 Dec 2000 16:17:06 -0500 (id <1001213211706.AA52988.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.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 wrote:

> If the SIGCHLD happens between the time that wait_for finds that the
> child process is running and the time it calls waitchld(), there might
> be a problem.  There's a very small window before wait_for sets
> waiting_for_job to 1 and calls waitchld() that a SIGCHLD may arrive.

This is wrong; the first thing wait_for() does is to block SIGCHLD.
There's no window.

-- 
``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@news01.syd.optusnet.com.au Sat Dec 16 08:05:39 2000
Received: from news1.mpx.com.au ([203.2.75.211] helo=news01.syd.optusnet.com.au)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147H1t-000383-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sat, 16 Dec 2000 08:05:38 -0500
Received: (from news@localhost)
	by news01.syd.optusnet.com.au (8.9.3/8.9.3) id AAA06641;
	Sun, 17 Dec 2000 00:05:30 +1100
To: gnu-bash-bug@prep.ai.mit.edu
From: "c.i.d"<centralid2000@yahoo.com>
Newsgroups: gnu.bash.bug 
Organization: directory
Subject: Become Wealthy with Secret Flaw in World Currency Market
Date: 16 Dec 2000 13:05:30 GMT
Lines: 46
Message-ID: <3a3b689a$0$18328$7f31c96c@news01.syd.optusnet.com.au>
NNTP-Posting-Host: 198.142.193.123
X-Trace: 976971930 news01.syd.optusnet.com.au 18328 198.142.193.123
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/>

BECOME WEALTHY WITH SECRET FLAW IN WORLD CURRENCY MARKET
For a short time, the Global Currency Program will instruct a limited number of individuals on how to convert 
$25.00 US into one hundred of legal currency. 

We will transact the first conversion for you, after that you can easily and quickly do this on your own as many 
times a day as you want.

I am sure you can see the power of this, however it is even more explosive than we have yet disclosed. While 
currency does fluctuate daily, we can show you how to convert $99 into $600. That means that you will be able 
to exchange $99 US legal tender (the stuff you buy groceries with) for $600 of the same.
Again, we must reiterate, anyone can do this, it is not MLM and the source is never-ending. 
As long as the global financial community continues to use different currencies with varying exchange rates, the 
secret flaw will exist. 
We would like to see a uniform global currency backed by gold, but until then, we will allow a limited number of 
individuals to share in the unlimited profits provided for by the world currency differentials. 
In a short time, with almost no investment or training, you will become a currency exchange professional who can 
make transactions from your own home by mail or by computer. The amount of money that you can earn is entirely 
up to you. It goes without saying that the more time and effort you put into the program, the more money you will make. 
The transactions are so simple a child could do it.
We are sure that this incredible opportunity will make you the kind of money that you have always dreamed of making.
Don't envy us, join us today by sending $29.95 for program,  (and your first currency conversion) + $10.00 
for processing and delivery in US funds. Total US $39.95
Secure Credit Card and Debit Card orders through 
http://www.paypal.com/
payable to:
 centraldirectories@yahoo.com

* A confirmation e-mail will be sent  to you requesting your name and correct mailing address.
**Your Program and first currency transaction will be mailed to you within 24 hours.
For general enquiries e-mail: centraldirectories@yahoo.com

To pay by cash or international money order in US funds to:
Central Internet Directories,
P.O. Box 303,
Woy Woy. 2256
N.S.W.  Australia.
* Please include your correct name and mailing address.

BONUS! If you order within the next seven days, you will receive free "Internet Marketing Secrets Revealed" on disc. 
************************************************************
This is not SPAM or UCE as we have either communicated in the past, you have posted to one of my FFA pages or 
we are on the same opt-in list or we belong to one of the news groups and we are telling you how to remove your 
e-mail address from our mailing lists. To be removed permanently from any and all of our databases, send a reply 
e-mail with the word "REMOVE" in the subject line to: nsrem@mail.com
We apologise if you have received this in error. 



From news@news01.syd.optusnet.com.au Sat Dec 16 09:44:24 2000
Received: from news1.mpx.com.au ([203.2.75.211] helo=news01.syd.optusnet.com.au)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147IZS-0006iw-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sat, 16 Dec 2000 09:44:23 -0500
Received: (from news@localhost)
	by news01.syd.optusnet.com.au (8.9.3/8.9.3) id BAA12980;
	Sun, 17 Dec 2000 01:44:19 +1100
To: gnu-bash-bug@prep.ai.mit.edu
From: "ALEX" <alex@wantedstuff.com>
Newsgroups: gnu.bash.bug 
Subject: FREE "WANTED" CLASSIFIEDS
Organization: www.wantedstuff.com
Message-ID: <36877.032128125@news.optusnet.com.au>
X-Newsreader: Post News
Date: 16 Dec 2000 14:44:19 GMT
Lines: 5
NNTP-Posting-Host: 198.142.112.77
X-Trace: 976977859 news01.syd.optusnet.com.au 2855 198.142.112.77
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/>

welcome to "www.wantedstuff.com" the online classified site for all
of your "wanted" items.place your ad/s into trhe category of your
choice for
free.



From news@venus.telepac.pt Sat Dec 16 14:01:31 2000
Received: from venus.telepac.pt ([194.65.14.50])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147MZ0-0008Al-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sat, 16 Dec 2000 14:01:30 -0500
Received: (from news@localhost)
	by venus.telepac.pt (8.10.2/8.10.2) id eBGJ1ML30565
	for gnu-bash-bug@prep.ai.mit.edu; Sat, 16 Dec 2000 19:01:22 GMT
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: sgybmn@worldex.com
Newsgroups: gnu.bash.bug
Subject: High Quality Porn Site With Animals  2988
Date: 16 Dec 2000 19:01:22 GMT
Lines: 9
Message-ID: <91ge62$cfi$21381@venus.telepac.pt>
NNTP-Posting-Host: 212.55.181.71
X-Trace: venus.telepac.pt 976993282 12786 212.55.181.71 (16 Dec 2000 19:01:22 GMT)
X-Complaints-To: abuse@mail.telepac.pt
NNTP-Posting-Date: 16 Dec 2000 19:01:22 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/>

http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB

http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB

http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB

http://www.memberpro.com/cgi-bin/goto.cgi?WS100015150IJ&FS100003529BB
kwyyhvbtyuqbgymwuepndpcbcsyoesmspunhhbgxdmfmqjhiwnmzihkbgldgmntyzimsfpmgzfymrfcznnsszqxqzqz



From news@venus.telepac.pt Sat Dec 16 16:36:36 2000
Received: from venus.telepac.pt ([194.65.14.50])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147P0N-0004Os-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sat, 16 Dec 2000 16:36:35 -0500
Received: (from news@localhost)
	by venus.telepac.pt (8.10.2/8.10.2) id eBGLITM01453
	for gnu-bash-bug@prep.ai.mit.edu; Sat, 16 Dec 2000 21:18:29 GMT
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: frqlun@worldex.com
Newsgroups: gnu.bash.bug
Subject: Free Pictures! No bull-shit!  1352
Date: 16 Dec 2000 21:18:28 GMT
Lines: 11
Message-ID: <91gm74$dpe$21381@venus.telepac.pt>
NNTP-Posting-Host: 212.55.181.71
X-Trace: venus.telepac.pt 977001508 14126 212.55.181.71 (16 Dec 2000 21:18:28 GMT)
X-Complaints-To: abuse@mail.telepac.pt
NNTP-Posting-Date: 16 Dec 2000 21:18:28 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/>

FREE PICTURE 1:
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/A
FRE PICTURE 2:
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/B
FRE PICTURE 3:
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/C

EXTRA PICTURE:
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/X
uspptyuwtvrqhbikgrzuzviqkdjdejjhovhrgozhntluoxfcgpgtvzyjgiiimvpmdrzxjlov



From news@venus.telepac.pt Sun Dec 17 07:48:13 2000
Received: from venus.telepac.pt ([194.65.14.50])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147dDH-0001D7-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sun, 17 Dec 2000 07:48:11 -0500
Received: (from news@localhost)
	by venus.telepac.pt (8.10.2/8.10.2) id eBHClxU28336
	for gnu-bash-bug@prep.ai.mit.edu; Sun, 17 Dec 2000 12:47:59 GMT
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: ceodfw@worldex.com
Newsgroups: gnu.bash.bug
Subject: FREE & EASY PICTURES! NO BULL SHIT!  6602
Date: 17 Dec 2000 12:47:59 GMT
Lines: 13
Message-ID: <91iclv$fqd$21381@venus.telepac.pt>
NNTP-Posting-Host: 212.55.181.208
X-Trace: venus.telepac.pt 977057279 16205 212.55.181.208 (17 Dec 2000 12:47:59 GMT)
X-Complaints-To: abuse@mail.telepac.pt
NNTP-Posting-Date: 17 Dec 2000 12:47:59 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/>

FREE PICTURE #1
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/A

FREE FUNY PICTURE #2
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/B

FREE FUNY VIDEO #1
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/C

FREE EXXTRA PICTURE!!!!!!!!
http://www.cybererotica.com/ad/rrr-in.html?rrr_60624/X
hlpxlrchoehyunesospnzfcmbfsvoioxqidwhgbehthrlpfutqeyjtiiefppciynkfycoukgtinzkucnhwbqiuemlbflpozmkre



From mnadiv@barak-online.net Sun Dec 17 13:47:37 2000
Received: from horizon.barak.net.il ([206.49.94.218] helo=horizon.barak-online.net)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 147iqP-0005nl-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 17 Dec 2000 13:47:37 -0500
Received: from prep.ai.mit.edu (pop09-1-ras1-p146.barak.net.il [212.150.107.146])
	by horizon.barak-online.net (8.9.3/8.9.1) with SMTP id UAA18155
	for bug-bash@prep.ai.mit.edu; Sun, 17 Dec 2000 20:47:27 +0200 (IST)
Message-Id: <200012171847.UAA18155@horizon.barak-online.net>
From: mnadiv<mnadiv@barak-online.net>
REPLY-TO: mnadiv@barak-online.net
X-Mailer: EzyMassMailer V2.xx
Date: 17 ãöîáø 2000
To: Newsletter.Subscriber@horizon.barak-online.net
Subject: Subject: The death, Conspiracy - by Prof. Arnon Samueloff MD - Israel
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/>

Subject: The death, Conspiracy - by Prof. Arnon Samueloff MD - Israel

WARNING: Prof. Arnon Samueloff MD - Medical Malpractice in Shaare Zedek Hospital

http://www.szmc.co.il/mal/

Read More in the Medical Malpractice Victims Organization - Shaare Zedek Israel site.









From chet@granite.ins.cwru.edu Mon Dec 18 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 1481ls-0005kg-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 18 Dec 2000 10:00:12 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA17541; Mon, 18 Dec 2000 10:00:01 -0500 (EST) (from chet)
Message-Id: <200012181500.KAA17541@granite.INS.CWRU.Edu>
Date: Mon, 18 Dec 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 news@prizematch.net Mon Dec 18 12:37:47 2000
Received: from pm3-54.wineasy.se ([195.42.201.54] helo=oemcomputer)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 1484EM-0003H4-00
	for <bug-bash@gnu.org>; Mon, 18 Dec 2000 12:37:46 -0500
From: "Prizematch crew" <news@prizematch.net>
To: <bug-bash@gnu.org>
Subject: Linkshare request
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Date: Mon, 18 Dec 2000 18:39:06
Message-Id: <E1484EM-0003H4-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/>

Hi!
We like your site and propose a banner swap / link exchange. 
Please let me know if you are interested.

Best Regards
Ola Danielsson
Prizematch Crew
www.Prizematch.net
_____________________________________________________________

Www.prizematch.net is the first event gateway leading the way to on- and 
offline computer game events with prizes (products and money). The portal-
service is free of charge and contain information about matches on all platforms 
(Playstation, SEGA, Nintendo, PC and Microsoft). Prizematch.net  is supported
 by game developers, publishers, online gaming services, newspapers and gamers.




From news@news01.syd.optusnet.com.au Tue Dec 19 10:56:33 2000
Received: from news1.mpx.com.au ([203.2.75.211] helo=news01.syd.optusnet.com.au)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 148P7v-0007df-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Tue, 19 Dec 2000 10:56:31 -0500
Received: (from news@localhost)
	by news01.syd.optusnet.com.au (8.9.3/8.9.3) id CAA00848;
	Wed, 20 Dec 2000 02:56:20 +1100
To: gnu-bash-bug@prep.ai.mit.edu
From: lottosuper<centralinternet@yahoo.com>
Newsgroups: gnu.bash.bug
Organization: directory
Subject: Play Lotto for Free and Win!
Date: 19 Dec 2000 15:56:20 GMT
Lines: 4
Message-ID: <3a3f8524$1$19404$7f31c96c@news01.syd.optusnet.com.au>
NNTP-Posting-Host: 198.142.107.237
X-Trace: 977241380 news01.syd.optusnet.com.au 19404 198.142.107.237
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/>

THIS IS AN AMAZING BREAKTHROUGH THAT IS GUARANTEED TO WORK JUST AS EASILY
FOR YOU AS IT DOES FOR ME!!
For more information and free details:
e-mail:   lottosuper2000@yahoo.com/ with info in the subject header


From gregbell@znet.com Wed Dec 20 02:08:16 2000
Received: from mta4.snfc21.pbi.net ([206.13.28.142])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 148dMG-0001gp-00
	for <bug-bash@gnu.org>; Wed, 20 Dec 2000 02:08:16 -0500
Received: from adsl-63-202-233-231.dsl.sndg02.pacbell.net ([63.202.233.231])
 by mta4.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9)
 with ESMTP id <0G5U001XBUHI9B@mta4.snfc21.pbi.net> for bug-bash@gnu.org; Tue,
 19 Dec 2000 23:08:11 -0800 (PST)
Date: Tue, 19 Dec 2000 23:10:27 -0800 (PST)
From: Greg Bell <gregbell@znet.com>
Subject: pipe with list seems to clobber variables
X-Sender: gregbell@gregs.room
To: bug-bash@gnu.org
Message-id: <Pine.LNX.4.21.0012192309410.4243-100000@gregs.room>
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/>

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_NT-5.0 RUSSELL 1.1.6(0.30/3/2) 2000-11-21 21:00 i686 unknown
Machine Type: i686-pc-cygwin

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

Description:

   if I have a list of commands, and there's a pipe anywhere in there,
   any variables set in the list seem to get erased.

Repeat-By:

   # this works
   { bs=1; echo "hi"; }
   echo "bs is $bs"

   # this doesn't work.  bs2 will always be blank
   { bs2=1; echo "hi"; } | tee nothing.log
   echo "bs2 is $bs2"



-- 
Greg Bell  858-860-6519



From chet@nike.ins.cwru.edu Wed Dec 20 10:30:59 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 148lCh-0000rz-00
	for <bug-bash@gnu.org>; Wed, 20 Dec 2000 10:30:55 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id KAA09255; Wed, 20 Dec 2000 10:30:43 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 20 Dec 2000 10:29:56 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: gregbell@znet.com
Subject: Re: pipe with list seems to clobber variables
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001220152956.AA37417.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 gregbell@znet.com of Tue, 19 Dec 2000 23:10:27 -0800 (PST) (id <Pine.LNX.4.21.0012192309410.4243-100000@gregs.room>)
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: i686-pc-cygwin
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
>    if I have a list of commands, and there's a pipe anywhere in there,
>    any variables set in the list seem to get erased.

Each element of a pipeline is run in a separate process, not the calling
shell.  A subprocess cannot affect its parent's environment.

-- 
``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@slate.ins.cwru.edu Wed Dec 20 10:49:10 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 148lUM-0001Wu-00
	for <bug-bash@prep.ai.mit.edu>; Wed, 20 Dec 2000 10:49:10 -0500
Received: from slate.ins.cwru.edu ([129.22.8.224])
	by chx400.switch.ch with esmtp (Exim 3.20 #1)
	id 148lUG-0003b2-00
	for gnu-bash-bug@moderators.isc.org; Wed, 20 Dec 2000 16:49:04 +0100
Received: by slate.INS.CWRU.Edu (8.9.3/CWRU-2.5-bsdi)
	id KAA24426; Wed, 20 Dec 2000 10:49:03 -0500 (EST) (from news for gnu-bash-bug@moderators.isc.org)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: prj@po.cwru.edu (Paul Jarc)
Newsgroups: gnu.bash.bug
Subject: Re: Can't test "-l"
Date: 20 Dec 2000 10:48:59 -0500
Organization: What did you have in mind?  A short, blunt, human pyramid?
Lines: 38
Message-ID: <m3u27zozy6.fsf@multivac.student.cwru.edu>
References: <1001215161434.AA71714.SM@nike.INS.CWRU.Edu>
NNTP-Posting-Host: multivac.student.cwru.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: slate.INS.CWRU.Edu 977327342 24424 129.22.239.69 (20 Dec 2000 15:49:02 GMT)
X-Complaints-To: abuse@po.cwru.edu
NNTP-Posting-Date: 20 Dec 2000 15:49:02 GMT
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/>

chet@nike.INS.CWRU.Edu (Chet Ramey) writes:
> > $ if [ "-l" != "-a" ] ; then echo "ok" ; fi
> > [: -a: binary operator expected                <----- ?
> > 
> > $ aa='-l'
> > $ if [ $aa != "-k" ] ; then echo "ok" ; fi
> > [: -k: binary operator expected                <----- ?
> 
> Here's the relevant item from the bash-2.05 COMPAT file:
> 
> 15.  Bash versions up to 1.14.7 included an undocumented `-l' operator to
>      the `test/[' builtin.
...
>      This operator is not part of the POSIX standard, because one can (and
>      should) use ${#variable} to get the length of a variable's value.
>      Bash-2.x does not support it.

I think what he means is that generally, he wants to operate on
strings which could be interpreted as operators.  E.g., with 2.04:
$ [ "-z" != "-a" ]; echo $?
0
$ [ -z "!=" -a -z "!=" ]; echo $?
[: too many arguments
2

I don't think infix operators can solve this problem.  BTW, what's up
with this:

$ [ -z foo ]; echo $?
1
$ [ -z foo ]
$ echo $?
0
$ echo $PROMPT_COMMAND # just checking...
$ 


paul


From utx@penguin.cz Wed Dec 20 12:58:19 2000
Received: from smtp4.vol.cz ([195.250.128.84])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 148nVK-0007IV-00
	for <bug-bash@gnu.org>; Wed, 20 Dec 2000 12:58:18 -0500
Received: from utx.cz (datelc-90.dialup.vol.cz [212.20.103.91])
	by smtp4.vol.cz (8.9.3/8.9.3) with ESMTP id SAA40979
	for <bug-bash@gnu.org>; Wed, 20 Dec 2000 18:58:03 +0100 (CET)
X-Envelope-To: <bug-bash@gnu.org>
Received: (from sb@localhost)
	by utx.cz (8.10.2/8.10.2) id eBKHVbt00376
	for bug-bash@gnu.org; Wed, 20 Dec 2000 18:31:37 +0100
Date: Wed, 20 Dec 2000 18:31:36 +0100
From: Stanislav Brabec <utx@penguin.cz>
To: bug-bash@gnu.org
Subject: bash/set - bad expansion for function while used as input
Message-ID: <20001220183136.A365@utx.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-Accept-Language: cs, sk, en
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by smtp4.vol.cz id SAA40979
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: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM=3D'bash' -DCONF_HOSTTYPE=3D'i686' -DCONF_O=
STYPE=3D'linux-gnu' -DCONF_MACHTYPE=3D'i686-pc-linux-gnuname output: Linu=
x utx 2.4.0-test10 #29 =C8t pro 7 11:03:49 CET 2000 i686 unknown
Machine Type: i686-pc-linux-gnu

Bash Version: 2.04
Patch Level: 0
Release Status: release
                                   =20
Description:
       set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
              Without options, the name and value of each shell variable
              are displayed in a format that  can be  reused  as input.
                                   =20
Included small script demonstrates it's not true.

Repeat-By:
--------------
#! /bin/bash

function bad_func()
{
  echo `echo This should not be printed!`
}

set >bad_func_dump

. bad_func_dump 2>/dev/null
--------------

Fix:

--=20
Stanislav Brabec


From bernard.delechamp@vaissiere-favre.com Thu Dec 21 04:54:30 2000
Received: from [193.252.19.222] (helo=citronier.wanadoo.fr)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1492Qe-0006Do-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 04:54:30 -0500
Received: from serveur.vaissiere-favre.com (193.251.83.72) by citronier.wanadoo.fr; 21 Dec 2000 10:54:17 +0100
Received: from bernard.vaissiere-favre.com (bernard.vaissiere-favre.com [192.168.1.50])
	by serveur.vaissiere-favre.com (Postfix) with ESMTP
	id 3CD22700A; Thu, 21 Dec 2000 10:54:24 +0100 (CET)
Received: by bernard.vaissiere-favre.com (Postfix, from userid 0)
	id 379ED39E3; Thu, 21 Dec 2000 10:53:37 +0100 (CET)
From: bernard.delechamp@vaissiere-favre.com
To: bug-bash@gnu.org
Subject: Extract the last n characters from a variable
Message-Id: <20001221095337.379ED39E3@bernard.vaissiere-favre.com>
Date: Thu, 21 Dec 2000 10:53:37 +0100 (CET)
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: 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 -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations
uname output: Linux bernard.vaissiere-favre.com 2.2.16 #4 mar aoû 22 09:40:00 CEST 2000 i686 unknown
Machine Type: i586-mandrake-linux-gnu

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

Description:
	I need to extract de last 2 characters from a variable.
	So, I try the syntax : ${varname:-2}. I think that there's a
	confusion with ${varname:-default_value}. Examples :

	[bernard@bernard /tmp]$ VAR=tartempion

	I want to obtain the string «on».

	[bernard@bernard /tmp]$ echo ${VAR:-2}
	tartempion

	With a positive offset, it's ok :

	[bernard@bernard /tmp]$ echo ${VAR:2}
	rtempion

Fix:

	The correct result is done by :

	[bernard@bernard /tmp]$ echo ${VAR:$[${#VAR}-2]}
	on

	Excuse my quite bad english, I'm french :)


From chet@nike.ins.cwru.edu Thu Dec 21 10:11:24 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1497NL-0007wU-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 10:11:23 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id KAA02454; Thu, 21 Dec 2000 10:11:20 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Thu, 21 Dec 2000 10:10:31 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: bernard.delechamp@vaissiere-favre.com
Subject: Re: Extract the last n characters from a variable
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001221151031.AA56743.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 bernard.delechamp@vaissiere-favre.com of Thu, 21 Dec 2000 10:53:37 +0100 (CET) (id <20001221095337.379ED39E3@bernard.vaissiere-favre.com>)
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by obsidian.INS.CWRU.Edu id KAA02454
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: i586
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM=3D'bash' -DCONF_HOSTTYPE=3D'i586' -DCONF=
_OSTYPE=3D'linux-gnu' -DCONF_MACHTYPE=3D'i586-mandrake-linux-gnu' -DCONF_=
VENDOR=3D'mandrake' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=3D64  -I=
. -I/usr/include -I. -I./lib -I/usr/include -O3 -fomit-frame-pointer -fno=
-exceptions -fno-rtti -pipe -s -mpentium -mcpu=3Dpentium -march=3Dpentium=
 -ffast-math -fexpensive-optimizations
> uname output: Linux bernard.vaissiere-favre.com 2.2.16 #4 mar ao=FB 22 =
09:40:00 CEST 2000 i686 unknown
> Machine Type: i586-mandrake-linux-gnu
>=20
> Bash Version: 2.03
> Patch Level: 19
> Release Status: release
>=20
> Description:
> 	I need to extract de last 2 characters from a variable.
> 	So, I try the syntax : ${varname:-2}. I think that there's a
> 	confusion with ${varname:-default_value}. Examples :

Just insert a space:

	${varname: -2}

--=20
``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 Dec 21 12:19:37 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 1499NM-0004pA-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 12:19:32 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id MAA06339; Thu, 21 Dec 2000 12:19:28 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Thu, 21 Dec 2000 12:17:54 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: utx@penguin.cz
Subject: Re: bash/set - bad expansion for function while used as input
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001221171754.AA57316.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 utx@penguin.cz of Wed, 20 Dec 2000 18:31:36 +0100 (id <20001220183136.A365@utx.cz>)
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.04
> Patch Level: 0
> Release Status: release
>                                    =20
> Description:
>        set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
>               Without options, the name and value of each shell variable
>               are displayed in a format that  can be  reused  as input.

What solution do users prefer?  POSIX.2 says only variables should be
printed, but printing functions seems like a reasonable thing to do.
How about printing only variables in POSIX mode, and printing functions
(but not as pseudo-assignment statements) when not in POSIX mode?

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 john.lonergan@ubsw.com Thu Dec 21 14:07:15 2000
Received: from gate.stm.ubswarburg.com ([151.191.1.10] helo=gate.stm.swissbank.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 149B3a-0001An-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 14:07:14 -0500
Received: (from smap@localhost)
	by gate.stm.swissbank.com (8.8.8/8.8.8) id OAA29267
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 14:07:13 -0500 (EST)
From: john.lonergan@ubsw.com
Received: from <john.lonergan@ubsw.com> (nine.ubswarburg.com [192.168.0.4]) by gate via smap (V2.0)
	id xma029148; Thu, 21 Dec 2000 14:06:48 -0500
Received: from sm0p9035pos.stm.swissbank.com (virscan2 [192.168.0.4])
	by virscan2.swissbank.com (8.8.8/8.8.8) with ESMTP id OAA03366
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 14:05:42 -0500 (EST)
Received: from ubsw.com (w2103046.ldn.swissbank.com [172.16.125.145])
	by sm0p9035pos.stm.swissbank.com (8.8.8/8.8.8) with ESMTP id OAA01135
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 14:06:54 -0500 (EST)
Message-ID: <3A4254C4.D6A5FFE8@ubsw.com>
Date: Thu, 21 Dec 2000 19:06:44 +0000
X-Mailer: Mozilla 4.7 [en-gb] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org
Subject: bash 2.04
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-WDR-Disclaimer: Version $Revision: 1.13 $
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/>

Operating system Solaris 2.6
Bash 2.04

When I type tilde followed by tab this core dumps bash.

When I dbx bash the coredump occurs during a call to getpwent while
examining the users in the netgoups for the current box.

DBX TRACE FOLLOWS


(dbx) run
Running: bash
(process id 20991)
lonergjj@ln4d556uss:4:.:~/bash/bash-2.04 $ ~Reading symbolic information
for nss_compat.so.1
Reading symbolic information for nss_nis.so.1
signal BUS (invalid address alignment) in getnetgr_end at 0xef652c68
0xef652c68: getnetgr_end+0x0018: ld      [%i2], %o0
Current function is username_completion_function
 1449     while (entry = getpwent ())
(dbx) where
  [1] getnetgr_end(0x1e3b90, 0xcfcfcfcf, 0xcfcfcfcf, 0x0, 0x18, 0x0), at
0xef652c68
  [2] getnetgr_destr(0x1e3b90, 0x0, 0xef652cd4, 0x0, 0x1e77b5,
0x1e77a0), at 0xef652ce8
  [3] netgr_end(0x1e3090, 0xefffc064, 0x1, 0x20b, 0x1f0020, 0x2), at
0xef7219a8
  [4] _nss_compat_getent(0x1e3090, 0xefffc190, 0x1e30b8, 0xef7ed2b8,
0x0, 0x10), at 0xef72222c
  [5] nss_getent_u(0xef627240, 0xef604fdc, 0xef627260, 0xefffc190,
0x1d6018, 0x1e6850), at 0xef5d52e4
  [6] nss_getent(0xef627240, 0xef604fdc, 0xef627260, 0xefffc190,
0xef627268, 0x1e77a0), at 0xef5d4e88
  [7] _getpwent_r(0x1bd01c, 0x1bd040, 0x400, 0x1bd01c, 0xef622eb4,
0xef605694), at 0xef605534
=>[8] username_completion_function(text = 0x1e67d0 "~", state = 23),
line 1449 in "complete.c"
  [9] completion_matches(text = 0x1e67d0 "~", entry_function = 0xe2c18 =
&username_completion_function(char *text, int state)), line 1398 in
"complete.c"
  [10] attempt_shell_completion(text = 0x1e67d0 "~", start = 0, end =
1), line 890 in "bashline.c"
  [11] gen_completion_matches(text = 0x1e67d0 "~", start = 0, end = 1,
our_func = 0xe2fc8 = &filename_completion_function(char *text, int
state), found_quote = 0, quote_char = 0), line 684 in "complete.c"
  [12] rl_complete_internal(what_to_do = 9), line 1264 in "complete.c"
  [13] rl_complete(ignore = 1, invoking_key = 9), line 284 in
"complete.c"
  [14] _rl_dispatch(key = 9, map = 0x1951d0), line 533 in "readline.c"
  [15] readline_internal_char(), line 406 in "readline.c"
  [16] readline_internal_charloop(), line 452 in "readline.c"
  [17] readline_internal(), line 466 in "readline.c"
  [18] readline(prompt = 0x1e1890
"lonergjj@ln4d556uss:4:.:~/bash/bash-2.04 $ "), line 272 in "readline.c"

  [19] yy_readline_get(), line 979 in "parse.y"
  [20] yy_getc(), line 916 in "parse.y"
  [21] shell_getc(remove_quoted_newline = 1), line 1607 in "parse.y"
  [22] read_token(command = 0), line 2178 in "parse.y"
  [23] yylex(), line 1856 in "parse.y"
  [24] yyparse(), line 387 in "bison.simple"
  [25] parse_command(), line 213 in "eval.c"
  [26] read_command(), line 257 in "eval.c"
  [27] reader_loop(), line 124 in "eval.c"
  [28] main(argc = 1, argv = 0xefffd3d4, env = 0xefffd3dc), line 628 in
"shell.c"
(dbx)



Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.



From chet@nike.ins.cwru.edu Thu Dec 21 14:18:14 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 149BED-0001lq-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 14:18:13 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id OAA17838; Thu, 21 Dec 2000 14:17:55 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Thu, 21 Dec 2000 14:17:06 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: john.lonergan@ubsw.com
Subject: Re: bash 2.04
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001221191706.AA65901.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 john.lonergan@ubsw.com of Thu, 21 Dec 2000 19:06:44 +0000 (id <3A4254C4.D6A5FFE8@ubsw.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/>

> Operating system Solaris 2.6
> Bash 2.04
> 
> When I type tilde followed by tab this core dumps bash.
> 
> When I dbx bash the coredump occurs during a call to getpwent while
> examining the users in the netgoups for the current box.

Read the Bash FAQ, question F3.

-- 
``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 hj4hj6@yahoo.com Thu Dec 21 15:37:35 2000
Received: from [160.193.160.180] (helo=mp.a-phys.eng.osaka-cu.ac.jp)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 149CT0-0005FB-00
	for <bug-bash@prep.ai.mit.edu>; Thu, 21 Dec 2000 15:37:34 -0500
Received: by mp.a-phys.eng.osaka-cu.ac.jp id AA24562; Fri, 22 Dec 2000 05:28:27 +0900
Date: 21 Dec 00 12:43:28 PM
From: hj4hj6@yahoo.com
Message-Id: <VXH6D4DHVBkO>
Subject: Improve your stepfamily life
Apparently-To: <burl@dielectrics.minimizingv.edu>
Apparently-To: <burkea@mail.belmont.edu>
Apparently-To: <burke@ch2.ch.pdx.edu>
Apparently-To: <burgos@hq.acm.org>
Apparently-To: <burgess@fig.cox.miami.edu>
Apparently-To: <burgeg@u.arizona.edu>
Apparently-To: <buresh@stolaf.edu>
Apparently-To: <bureau@brown.edu>
Apparently-To: <burdick@usc.edu>
Apparently-To: <burbine.tom@nmnh.si.edu>
Apparently-To: <buns@holzmane.edu>
Apparently-To: <bunk@debian.org>
Apparently-To: <buncht@swau.edu>
Apparently-To: <bum@fiddlesticksi.org>
Apparently-To: <bullied@resolved.beanert.edu>
Apparently-To: <bulletin@indiana.edu>
Apparently-To: <bulldog-club@athletics.msstate.edu>
Apparently-To: <bukp@ffxvxowzgbqmxybx.org>
Apparently-To: <buildingcommunity@colorado.edu>
Apparently-To: <bugs@mail.ntp.org>
Apparently-To: <bugler@lesbianm.org>
Apparently-To: <bug-mh@ics.uci.edu>
Apparently-To: <bug-gnucomm@gnu.org>
Apparently-To: <bug-bash@prep.ai.mit.edu>
Apparently-To: <buel@xu.edu>
Bcc:
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/>

Does your stepfamily life resemble a soap opera more than it does the Brady
Bunch?

The Stepfamily Association of America invites you to participate in THE
NATIONAL CONFERENCE FOR STEPFAMILIES, Feb. 23-24, 2001, at the New Orleans
Marriott Hotel.

This is an opportunity, designed by knowledgeable professionals, in
stepfamilies themselves, to help you:
* Make your remarriage a success
* Create bonds with your stepchildren
* Help your children adjust emotionally
* Manage money matters unique to your family
* Get more help from legal, financial, psychological advisors
* Overcome stepfather and stepmother stereotypes
* Elicit cooperation from your children's schools
* Bring more harmony into family life

Complete conference details at http://www.edupr.com
REGISTER ONLINE!

Attend, and also enjoy Mardi Gras week in New Orleans!

Special discounts for couples, students, groups.

HOTEL IS BOOKING UP FAST. ACT NOW BEFORE ROOM BLOCK AND
AIRLINE SEATS FILL Special rates for conference attendees. Visit
http://www.edupr.com for discounts. Childcare available through a bonded
local service.

Up to 17 professional development credits available if you are an 			
educator, clinician, financial planner, social worker.

Questions? Email stepfamilyconf@mail.com

If you would like to be removed, please email us back with the word "Remove" in the subject line. We apologize for any inconvenience.



From kehoe@student.fsa.ucl.ac.be Thu Dec 21 16:04:52 2000
Received: from orion.info.ucl.ac.be ([130.104.228.187])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 149CtP-0006lB-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 16:04:51 -0500
Received: from phenix.info.ucl.ac.be (phenix [130.104.228.158])
	by orion.info.ucl.ac.be (8.9.0.Beta5/8.9.0.Beta5/mp/fg-orion) with ESMTP id WAA12407
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 22:04:48 +0100 (MET)
Received: (from kehoe@localhost) by phenix.info.ucl.ac.be (8.7.5/8.7.3) id WAA02176 for bug-bash@gnu.org; Thu, 21 Dec 2000 22:04:47 +0100 (MET)
Date: Thu, 21 Dec 2000 22:04:47 +0100 (MET)
Message-Id: <200012212104.WAA02176@phenix.info.ucl.ac.be>
From: kehoea@parhasard.net
To: bug-bash@gnu.org
Subject: Badly behaved commmand substitution recursion.
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' -DHOSTTYPE='sparc' -DOSTYPE='solaris2.7' -DMACHTYPE='sparc-sun-solaris2.7' -DSHELL -DHAVE_CONFIG_H  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I. -I. -I./lib -g -O2
uname output: SunOS phenix 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.02
Patch Level: 1
Release Status: release

Description:

I'm not sure, maybe this is a posix requirement, but it seems that
command-expansion recursion stops at level 3, i.e. it substitutes the
output of the first 2 nested commmand substitutions, but no more. In the
example below, the $(cat filename) line should come out with "command
not found" as it tries to execute program "hi" with argument
"there". 

Repeat-By:

$ echo $BASH_VERSION
2.02.1(1)-release
$ echo "echo \`echo hi there\`" > filename
$ cat filename
echo `echo hi there`
$ $(cat filename)
`echo hi there`

	[Describe the sequence of events that causes the problem
	to occur.]

Try to use 3 levels of commmand substitution. 

Sorry, haven't got the time to fix the thing *just* now ...



From root@alesaismaphia.myip.org Thu Dec 21 22:50:13 2000
Received: from [151.15.168.33] (helo=alesaismaphia.myip.org)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 149JDg-000087-00
	for <bug-bash@gnu.org>; Thu, 21 Dec 2000 22:50:12 -0500
Received: by alesaismaphia.myip.org (Postfix, from userid 0)
	id 2BCBCE0917; Fri, 22 Dec 2000 04:53:10 +0100 (CET)
From: ralph@alesaismaphia.myip.org
To: bug-bash@gnu.org
Subject: decode_prompt_string () bug in octal expansion
Message-Id: <20001222035310.2BCBCE0917@alesaismaphia.myip.org>
Date: Fri, 22 Dec 2000 04:53:10 +0100 (CET)
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: i586
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/opt/shells/bash/include -g -O2
uname output: Linux alesaismaphia.myip.org 2.4.0-test12 #6 Thu Dec 21 21:50:42 CET 2000 i586 unknown
Machine Type: i586-pc-linux-gnu

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

Description:
	in decode_prompt_string () (file parse.y line 3005) when expanding
	octal sequences, you assume 
	> string += 3;
	if the octal sequence isn't 3 bytes long and the octal is at the end 
	of *string, the end of *string ('\0') is skipped, so the prompt will
	be broken (heap inspection)

Repeat-By:
	export PS1=\\0
	export PS2=\\12
	# any \\octal_numer_with_less_than_3_digits

Fix:
	instead of
	> string +=3;
	i use
	{
	  int i=0;
	  for (; (*string>='0') && (*string <='7') && i<=2; i++)
	    string++;
	}
	
	i check for the lenght of the octal sequence in the next 3 bytes, so i 
	dont't break \0000000.

please reply at <alphanum@libero.it>, otherwise because the dyndns 
when i'm offline points to someone else your reply may not arrive 
to me.

ralph karamanzov -- maphiasoft associated


From rajendrak@momentumindia.com Fri Dec 22 07:08:51 2000
Received: from [202.169.152.41] (helo=delnd1.bplnet.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 149R0E-0001u7-00; Fri, 22 Dec 2000 07:08:50 -0500
Received: from momentumindia.com (root@[202.169.154.20] (may be forged))
	by delnd1.bplnet.com (8.8.6 (PHNE_17190)/8.8.6) with ESMTP id RAA29101;
	Fri, 22 Dec 2000 17:30:32 +0530 (IST)
Received: from rajendrak (IDENT:root@localhost.localdomain [127.0.0.1])
	by momentumindia.com (8.9.3/8.9.3) with SMTP id RAA03170;
	Fri, 22 Dec 2000 17:59:02 +0530
Message-ID: <003d01c06c0f$927f4f20$c30137bf@momentumindia.com>
Reply-To: "Rajendra" <rajendrak@momentumindia.com>
From: "Rajendra" <rajendrak@momentumindia.com>
To: <bug-texinfo-request@gnu.org>
Subject: Problem in installing Gnats s/w
Date: Fri, 22 Dec 2000 17:35:15 +0530
Organization: MIPL
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_003A_01C06C3D.8B830BC0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
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/>

This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C06C3D.8B830BC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

  Hi,
             i need help from u ..if u can .i have tried to install gnats
bug tracking system on my system .now i am facing problem in installing the
demons. Demons are not getting started. we have put entries in services and
inetd.conf .
            when we are trying to start the service through gnatsd . we are
getting the error message "520 you are not on the host access list:stdin
(stdin).
            I had put host in gnatsd.conf & checked gnatsd.access also but
above error message still occur.

            i had given following parameter whenever execute the configure
at shell prompt i.e. #./configure

          ./configure    --with-full-gnats
                             --prefix=home/GNATS_ROOT/gnats-3.113/prefix
                             --eprefix=home/GNATS_ROOT/gnats-3.113/e-prefix
                             --with-gnats-root =
home/GNATS_ROOT/gnats-3.113/data
                             --with-gnats-server = gnats.com
                             --with-gnats-service = gnats
                             --with-gnats-user = gnats
                             --with-gnats-port = 1529
                             --verbose


Note:  i am also attaching gnatsd.conf,gnatsd.access and inetd.conf  file
for ur help to understand the whole issue.

i am very thankful if u give ur valuable suggestion.

with thanx & regards
rajendrak@momentumindia.com


------=_NextPart_000_003A_01C06C3D.8B830BC0
Content-Type: text/plain;
	name="gnatsd.conf.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="gnatsd.conf.txt"

#
#                  Hosts that can do lookups with the GNATS daemon.
#
# Any line which begins with a `#' is considered a comment, and GNATS
# will ignore it.=20
#
# Each entry has the format:
#=20
# host:access-level:whatever
#
#       * host: the hostname or IP address of the user contacting =
gnatsd.
#         Wildcard characters are supported:=20
#                  "*" matches anything; "?" matches any single =
character
#       * access-level: (default =3D edit)
#               deny     - gnatsd closes the connection
#               none     - no further access until userid and password =
given
#               view     - query and view PRs with Confidential=3Dno =
only
#               viewconf - query and view PRs with Confidential=3Dyes
#               edit     - full edit  access
#               admin    - full admin access (not currently used)
#         This is just the default access level for the user's host. =
Normally,
#         this will get overridden (increased) with the USER command. =
See the
#         gnatsd.access file.
#
#       We currently don't make use of the third field.  Ideas include
#       listing the categories, the PRs matching a given submitter-id, =
and
#       the PRs of a certain category to a particular site.
#
#192.168.*:view:
#software.free.com:edit:
#gnats:edit:*
# setting done by us is as follows
191.55.1.177:edit:*
127.0.0.1:edit:*
gnats:admin:*


------=_NextPart_000_003A_01C06C3D.8B830BC0
Content-Type: text/plain;
	name="gnatsd.access.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="gnatsd.access.txt"

#
#                  User access levels with the GNATS daemon.
#
# Any line which begins with a `#' is considered a comment, and GNATS
# will ignore it.=20
#
# Each entry has the format:
#=20
# userid:password:access-level:database-alias
#
#       Wildcard characters are supported for userid, password and =
database.
#            "*" matches anything; "?" matches any single character
#
#       * userid:   a user id to gain access to gnatsd
#       * password: a password for the user
#       * access-level: (default =3D edit)
#               deny     - gnatsd closes the connection
#               none     - no further access until userid and password =
given
#               view     - query and view PRs with Confidential=3Dno =
only
#               viewconf - query and view PRs with Confidential=3Dyes
#               edit     - full edit  access
#               admin    - full admin access (not currently used)
#         This overrides (increases but never lowers) the access level =
given
#         as the default for the user's host in the /etc/gnatsd.conf =
file.
#       * database-alias: a comma-separated list of database aliases to
#         match alias entries from the second field of the database file
#         /etc/gnats-db.conf. This field is only used in =
/etc/gnatsd.access.
#         It's ignored in gnatsd-adm/gnatsd.access since this file is =
already
#         database specific.
#
# setting done by us is as follows

*:*:edit:
root:password:edit:
gnats:gnats:edit:

------=_NextPart_000_003A_01C06C3D.8B830BC0
Content-Type: text/plain;
	name="inetd.conf.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="inetd.conf.txt"

#
# inetd.conf This file describes the services that will be available
# through the INETD TCP/IP super server.  To re-configure
# the running INETD process, edit this file, then send the
# INETD process a SIGHUP signal.
#
# Version: @(#)/etc/inetd.conf 3.10 05/27/93
#
# Authors: Original taken from BSD UNIX 4.3/TAHOE.
# Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#
# Modified for Debian Linux by Ian A. Murdock =
<imurdock@shell.portal.com>
#
# Modified for RHS Linux by Marc Ewing <marc@redhat.com>
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# Echo, discard, daytime, and chargen are used primarily for testing.
#
# To re-read this file after changes, just do a 'killall -HUP inetd'
#
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#time stream tcp nowait root internal
#time dgram udp wait root internal
#
# These are standard services.
#
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream  tcp nowait  root    /usr/sbin/tcpd in.telnetd
#
# Shell, login, exec, comsat and talk are BSD protocols.
#
shell stream tcp nowait root /usr/sbin/tcpd in.rshd
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
#exec stream tcp nowait root /usr/sbin/tcpd in.rexecd
#comsat dgram udp wait root /usr/sbin/tcpd in.comsat
talk dgram udp wait nobody.tty /usr/sbin/tcpd in.talkd
ntalk dgram udp wait nobody.tty /usr/sbin/tcpd in.ntalkd
#dtalk stream tcp wait nobody.tty /usr/sbin/tcpd in.dtalkd
#
# Pop and imap mail services et al
#
#pop-2   stream  tcp     nowait  root    /usr/sbin/tcpd ipop2d
#pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd ipop3d
#imap    stream  tcp     nowait  root    /usr/sbin/tcpd imapd
#
# The Internet UUCP service.
#
#uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l
#
# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers." Do not uncomment
# this unless you *need* it. =20
#
#tftp dgram udp wait root /usr/sbin/tcpd in.tftpd
#bootps dgram udp wait root /usr/sbin/tcpd bootpd
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers."  Many sites choose to disable =

# some or all of these services to improve security.
#
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd
#cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd
#systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx
#netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f inet
#
# Authentication
#
auth stream tcp wait root /usr/sbin/in.identd in.identd -e -o
#
# End of inetd.conf

support stream tcp nowait gnats =
/home/GNATS_ROOT/gnats-3.113/e-prefix/libexec/gnats/gnatsd gnatsd

linuxconf stream tcp wait root /bin/linuxconf linuxconf --http
#swat      stream  tcp     nowait.400      root /usr/sbin/swat swat

linuxconf stream tcp wait root /bin/linuxconf linuxconf --http

------=_NextPart_000_003A_01C06C3D.8B830BC0--



From john.lonergan@ubsw.com Fri Dec 22 09:45:54 2000
Received: from gate.stm.ubswarburg.com ([151.191.1.10] helo=gate.stm.swissbank.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 149TSE-0001CI-00
	for <bug-bash@gnu.org>; Fri, 22 Dec 2000 09:45:54 -0500
Received: (from smap@localhost)
	by gate.stm.swissbank.com (8.8.8/8.8.8) id JAA09398
	for <bug-bash@gnu.org>; Fri, 22 Dec 2000 09:45:44 -0500 (EST)
Received: from <john.lonergan@ubsw.com> (eight.ubswarburg.com [192.168.0.3]) by gate via smap (V2.0)
	id xma009228; Fri, 22 Dec 2000 09:45:18 -0500
Received: from sm0p9035pos.stm.swissbank.com (virscan1 [192.168.0.3])
	by virscan1.swissbank.com (8.8.8/8.8.8) with ESMTP id JAA21030
	for <bug-bash@gnu.org>; Fri, 22 Dec 2000 09:46:36 -0500 (EST)
Received: from ubsw.com (w2103046.ldn.swissbank.com [172.16.125.145])
	by sm0p9035pos.stm.swissbank.com (8.8.8/8.8.8) with ESMTP id JAA06744;
	Fri, 22 Dec 2000 09:45:24 -0500 (EST)
Message-ID: <3A4368FB.C6C28CA8@ubsw.com>
Date: Fri, 22 Dec 2000 14:45:15 +0000
From: John Lonergan <john.lonergan@ubsw.com>
X-Mailer: Mozilla 4.7 [en-gb] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org, kevin.ruscoe@ubsw.com
Subject: Use of ~ expansion
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-WDR-Disclaimer: Version $Revision: 1.13 $
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/>

Would it be possible to have the equivalent of HOSTFILE but for tilda
expansion ?

We have a huge number of uses on our systems but I only ever want ~
completion for a small set that I could predefine in a text file.

Tilda expansion currently takes ages on our system.

Thanks for your help

JL




Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.



From news@dejanews.com Fri Dec 22 19:03:28 2000
Received: from chi6-1.relay.mail.uu.net ([199.171.54.98])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 149c9n-00026K-00
	for <bug-bash@prep.ai.mit.edu>; Fri, 22 Dec 2000 19:03:27 -0500
Received: from mail.deja.com by chi6sosrv11.alter.net with ESMTP 
	(peer crosschecked as: [64.57.170.34])
	id QQjusu25485
	for <gnu-bash-bug@moderators.isc.org>; Sat, 23 Dec 2000 00:03:23 GMT
Received: from nnrp1.deja.com (nnrp1.deja.com [10.12.2.16])
	by mail.deja.com (8.11.1/8.11.1) with ESMTP id eBN03M506520
	for <gnu-bash-bug@moderators.isc.org>; Fri, 22 Dec 2000 18:03:22 -0600
Received: (news@localhost) by nnrp1.deja.com (8.7.6/8.6.12) id SAA04145; Fri, 22 Dec 2000 18:03:17 -0600
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: jtreleaven@my-deja.com
Newsgroups: gnu.bash.bug
Subject: ksh FPATH functionality
Date: Sat, 23 Dec 2000 00:03:20 GMT
Organization: Deja.com
Lines: 16
Message-ID: <920q45$41g$1@nnrp1.deja.com>
NNTP-Posting-Host: 205.150.114.144
X-Article-Creation-Date: Sat Dec 23 00:03:20 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
X-Http-Proxy: 1.1 x61.deja.com:80 (Squid/1.1.22) for client 205.150.114.144
X-MyDeja-Info: XMYDJUIDjtreleaven
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/>

Is anyone working on adding ksh's FPATH to bash?  Is there some way to
get this type of functionality using bash's facilities - that I do not
know about?

If not - would the maintainer be willing to add such functionality to
the standard bash distribution if someone did the work?  Or does it
somehow conflict with the roadmap/philosophy of those currently
actively contributing to the bash development?

I *really* like FPATH ...

James


Sent via Deja.com
http://www.deja.com/


From alt@card.kyiv.net Sun Dec 24 17:38:42 2000
Received: from host193.card.com.ua ([194.93.175.193] helo=card.kyiv.net)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14AJmo-0007xH-00
	for <bug-bash@prep.ai.MIT.Edu>; Sun, 24 Dec 2000 17:38:39 -0500
Message-ID: <3A37F851.DFFB71A4@cybercafe.com.ua>
Date: Thu, 14 Dec 2000 00:29:38 +0200
From: Alt <alter@cybercafe.com.ua>
X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.34 i686)
MIME-Version: 1.0
To: bug-bash@prep.ai.MIT.Edu
Subject: symbols pathname >= 1024
Content-Type: multipart/mixed; boundary="------------730052FBC18A38EA9CE9D979"
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/>

This is a multi-part message in MIME format.
--------------730052FBC18A38EA9CE9D979
Content-Type: text/plain; charset=x-UNICODE-2-0-UTF-7
Content-Transfer-Encoding: 7bit

Version info: GNU Bash vesion 1.14.7(1)
    * comes with Linux Slackware 3.5
System Info: Linux 2.0.34 (instalation Slack Ware 3.5 )
     Cyrix MII pr.300 (233Mhz but runes at 180 indeed)
     16MB ram (FOSA) (There is no worse kind of RAM, I did not know that
it is russian when I bought it)
     Mother "noname" with Intel TX
Compiler info: I don't sure but guess it was compiled with current
compiler of such distribution which is:
     Reading specs from
/usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.29/specs
     gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
BUG description:
 I tried to cd into the catalog which common length was longer then 1024
characters
 then I make it longher and shorter then 1024 char.'s.
 But I fount that is i cd to the catalog which common lengsth
/abcd+AH4-efg[/hijk+AH4-lmn].../
  longers then 1024 symbols it terminetes. :(

Script to exam the bug:
it does not have effect with script, just with manual entering.


P.S. By the way how bash differ its scripts (without #!/bin/bash) and
binaries ???


--------------730052FBC18A38EA9CE9D979
Content-Type: application/x-gzip; name="bug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="bug.tar.gz"

H4sICDD3NzoAA2J1Zy50YXIA7Zldb9MwFIZ3WSL5P5ypSAOkNWn6EehdYeVD4kswaVcguYnX
REvsKXHYdsNv57gJa5nomKoOG3SeVmpTx6dHb+zqfVNxyYvzXOzdJ/0giEYj2ANDcOMVYBgO
RwBR2B9F43F/3AfoB6PBeA+Ce+2qpa40LwH2SqX0bef9afwfpbvvzzPpz3mVel2vC7mQC52C
OgXxTZRXEHPNc7WAfhhBnPKSx1qUFVxkOlW1hgP/AKcVZ0lWgj+1ixcnYL+JRgt4bpelFtab
aLV4YZdGC9tNtFoc2aXRwnYTrRYzuzRa2G6i1eKlXRotbDfRavHKLo0WtptotXhtl0YL203Y
Nkn/Mejt7v070P+Ph8NN/r+Pzn/Y+v9oEI4xC0AUBUPy/3+D4/Iqk0t73wuWj17Pe6GkFOjz
E9CqHfFmVczPxSoCQFbBwdcvBz2PeYCTAN5I4PCeF8KEh5efZrOjD+9gf38fxxseRVH02By9
zWR9CSGWHQyZZx4JL8+W1wGXYyYnwHPNvI+8qi5UmUyAeetTenjIK/3z3OO0hiMRAy6iIJgE
zyajEJQEra/OR3jqewUFz/Ke+Zop5Dw+y/GSlwLfJlem1eelqhcpL5h3Ivg3geGH5znIbJFq
4BpSYbpSBRZ4MJVYuEoFJApPm2NWilP8+CQVsj2vTIDLBFJU56IZ/VhjNW6EyyTgU+N0KbD6
XNWlkb5siq9EmPjn9dxHCbqAv77++gDmswoOcxBNamfeYXlxWR6ap9lJppZean39xhCG/UEj
0QDCwWTwdDV/vTRGvdXAWi7EA7ZVMlxOdCMbMifCIXMkHTIn4iFzJB8yJwIicyQhMiciInMk
IzInQiJzJCUyJ2IicyQnMieCInMkKTInouKvjqZnjOmMx+m1WZHGn6a8QkfW+hm0ZDcczKM1
C/PYMw5osqw0gVgVhbF3Es3VqaplcuPr/N/7KtRlOn2y/uGO/ERn65nLrtxqyd9gEzo7Nx6b
K5Isv8Xf0tN0duaO6MI4emH81rB1dm4B716RFgctjo34d/TYnZ279lVFWqC0QJ1eoP6Oolln
65m0RWiL0Ba5FX/DHYDOzu8pbK5I25S2KW1T57epv+Xts87ObsR14bNYFEJqrjMl4ZTX5i/d
65+N7w/h1yNxmf2Pf68TBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQxL3yAwEnHpQAUAAA
--------------730052FBC18A38EA9CE9D979--





From keichii@peorth.iteration.net Sun Dec 24 18:51:11 2000
Received: from peorth.iteration.net ([208.190.180.178])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14AKv0-00029o-00; Sun, 24 Dec 2000 18:51:10 -0500
Received: by peorth.iteration.net (Postfix, from userid 1001)
	id 8CF38574A7; Sun, 24 Dec 2000 17:51:23 -0600 (CST)
Date: Sun, 24 Dec 2000 17:51:23 -0600
From: "Michael C . Wu" <keichii@iteration.net>
To: bfox@gnu.org, bug-bash@gnu.org
Subject: Bash and multibyte characters
Message-ID: <20001224175123.A87056@peorth.iteration.net>
Reply-To: "Michael C . Wu" <keichii@peorth.iteration.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-PGP-Fingerprint: 5025 F691 F943 8128 48A8  5025 77CE 29C5 8FA1 2E20
X-PGP-Key-ID: 0x8FA12E20
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/>

Hello bash users:

Regarding multibyte character support, here is a feature suggestion:
Say we have two-byte characters (commonly used in Chinese/Japanese/
Korean) AA, BB, XX, and YY

The correct behavior when I have the following text:

AABBXXYY<cursor>
and I push "backspace" once
The result would be:
AABBXX

But bash does this:
AABBXXY

And we have to push the delete button again, same incorrect behavior
happens with arrow keys, ^W and etc.

Basically, bash needs to be taught about multibyte characters.
Would you mind modifying bash behavior to respect an environmental
shell variable that toggles this as well as the functionality?

Merry Christmas and thanks,

Michael
-- 
+------------------------------------------------------------------+
| keichii@peorth.iteration.net         | keichii@bsdconspiracy.net |
| http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. |
+------------------------------------------------------------------+


From chet@granite.ins.cwru.edu Mon Dec 25 10:00:09 2000
Received: from granite.ins.cwru.edu ([129.22.8.228])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14AZ6e-0005hu-00
	for <bug-bash@prep.ai.mit.edu>; Mon, 25 Dec 2000 10:00:08 -0500
Received: (chet@localhost) by granite.INS.CWRU.Edu (8.8.8+cwru/CWRU-2.5-bsdi)
	id KAA04822; Mon, 25 Dec 2000 10:00:02 -0500 (EST) (from chet)
Message-Id: <200012251500.KAA04822@granite.INS.CWRU.Edu>
Date: Mon, 25 Dec 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 news@spacebar.ucc.usyd.edu.au Tue Dec 26 08:28:10 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14Au9B-0003H1-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 26 Dec 2000 08:28:09 -0500
Received: from lorica.ucc.usyd.edu.au ([129.78.64.15])
	by chx400.switch.ch with esmtp (Exim 3.20 #1)
	id 14Au98-0005dk-00
	for gnu-bash-bug@moderators.isc.org; Tue, 26 Dec 2000 14:28:06 +0100
Received: from spacebar.ucc.usyd.edu.au (spacebar.ucc.usyd.edu.au [129.78.64.8])
	by lorica.ucc.usyd.edu.au (8.9.3/8.9.3) with ESMTP id AAA27205
	for <gnu-bash-bug@moderators.isc.org>; Wed, 27 Dec 2000 00:27:51 +1100 (EST)
Received: (from news@localhost)
	by spacebar.ucc.usyd.edu.au (8.9.3/8.9.3) id AAA27661
	for gnu-bash-bug@moderators.isc.org; Wed, 27 Dec 2000 00:27:59 +1100 (EST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: Doug Kearns <djkea2@mugca.cc.monash.edu.au>
Newsgroups: gnu.bash.bug
Subject: compgen kills shell
Date: Wed, 27 Dec 2000 00:43:00 +1100
Organization: The University of Sydney, Australia
Lines: 10
Message-ID: <92a6cv$r09$1@spacebar.ucc.usyd.edu.au>
Reply-To: djkea2@mugca.cc.monash.edu.au
NNTP-Posting-Host: p16345.net10.usyd.edu.au
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8Bit
X-Trace: spacebar.ucc.usyd.edu.au 977837279 27657 10.0.63.217 (26 Dec 2000 13:27:59 GMT)
X-Complaints-To: usenet@news.usyd.edu.au
NNTP-Posting-Date: 26 Dec 2000 13:27:59 GMT
User-Agent: KNode/0.3.3
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/>

G'Day Chet and others,

This dumps core and kills the shell, however, if you filter the diff 
through an equivalent sed command it doesn't. Hmmmm.....

compgen -W "$( diff <( compgen -A variable ) <( compgen -A export )\
| awk '{ print $2 }' )"

Thanks,
Doug Kearns


From ogoldshmidt@comgates.co.il Tue Dec 26 11:13:55 2000
Received: from [212.150.198.2] (helo=erwin.comgates.co.il)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14AwjZ-0001P6-00
	for <bug-bash@gnu.org>; Tue, 26 Dec 2000 11:13:53 -0500
Received: (from oleg@localhost)
	by erwin.comgates.co.il (8.11.0/8.11.0) id eBQGDTZ01088;
	Tue, 26 Dec 2000 18:13:29 +0200
Date: Tue, 26 Dec 2000 18:13:29 +0200
From: Oleg Goldshmidt <ogoldshmidt@comgates.co.il>
Message-Id: <200012261613.eBQGDTZ01088@erwin.comgates.co.il>
To: bug-bash@gnu.org
Subject: bash does not recognize filenames with spaces unless root/su
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: 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 erwin 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:
	[Detailed description of the problem, suggestion, or complaint.]

On an i686 running Red Hat Linux 7.0 bash cannot recognize
filenames or directories that have spaces, unless I am root/su.
This does not happen in ksh, zsh, or tcsh, so it looks like a bug 
in bash.

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

$ mkdir "Foo Bar"
$ cd Foo\ Bar/
bash: cd: Foo: No such file or directory
$ su        
Password: 
# cd Foo\ Bar/
/home/oleg/tmp/Foo Bar

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@telenet-ops.be Tue Dec 26 11:35:12 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 14Ax4C-00024p-00
	for <bug-bash@prep.ai.mit.edu>; Tue, 26 Dec 2000 11:35:12 -0500
Received: from smtp.pandora.be (hercules.telenet-ops.be [195.130.132.33])
	by rutgers.rutgers.edu (8.8.8/8.8.8) with SMTP id LAA25802
	for <gnu-bash-bug@moderators.isc.org>; Tue, 26 Dec 2000 11:35:10 -0500 (EST)
Received: (qmail 19067 invoked from network); 26 Dec 2000 16:35:07 -0000
Received: from unknown (HELO afrodite.telenet-ops.be) ([195.130.132.65]) (envelope-sender <news@telenet-ops.be>)
          by hercules.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <gnu-bash-bug@moderators.isc.org>; 26 Dec 2000 16:35:07 -0000
Received: (from news@localhost)
	by afrodite.telenet-ops.be (8.8.8+Sun/8.8.8) id RAA27624;
	Tue, 26 Dec 2000 17:35:06 +0100 (MET)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: bob@lenaerts.org@telenet-ops.be
Newsgroups: gnu.bash.bug
Subject: did you ever see something like this ?  3855
Lines: 5
Message-ID: <ZM326.95629$Ww.1938998@afrodite.telenet-ops.be>
Date: Tue, 26 Dec 2000 16:35:05 GMT
NNTP-Posting-Host: 213.224.70.17
X-Complaints-To: abuse@pandora.be
X-Trace: afrodite.telenet-ops.be 977848505 213.224.70.17 (Tue, 26 Dec 2000 17:35:05 MET)
NNTP-Posting-Date: Tue, 26 Dec 2000 17:35:05 MET
Organization: Pandora - Met vlotte tred op Internet
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/>

take a look at http://www.webline.be and see the rates for hosting your site. Its almost for free. And you must check out its speed.
WAAAAAUUUW. great.
take a look
rqhlopqtkspjvdniuboblfjddkjrzglqpjrnpqekeunbdhhntgqsscnkzqvjlmbykptrpyzhgbfulnyeuorskcnlwe


From fred@mobach.nl Tue Dec 26 16:58:14 2000
Received: from mail.mobach.nl ([212.136.194.138] helo=servans.mobach.nl)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14B26n-0006xh-00
	for <bug-bash@gnu.org>; Tue, 26 Dec 2000 16:58:13 -0500
Received: (from fred@localhost)
	by servans.mobach.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id WAA09848
	for bug-bash@gnu.org; Tue, 26 Dec 2000 22:58:09 +0100
Date: Tue, 26 Dec 2000 22:58:09 +0100
Message-Id: <200012262158.WAA09848@servans.mobach.nl>
From: fred@mobach.nl
To: bug-bash@gnu.org
Subject: Perhaps variables are re-initialized after a while loop
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: 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./lib -I/usr/include -O2 -m486 -D_GNU_SOURCE -Wall -pipe
uname output: Linux servans 2.2.14 #1 Sat Mar 25 00:45:35 GMT 2000 i586 unknown
Machine Type: i386-suse-linux

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

Description:
	In the example below I have initialized a variable LINENUMBER
        with the value zero. Then I enter a loop to process a number
        of lines. In the loop the variable LINENUMBER is output.
        After the end of the loop the variable is reset to the initial
        value.

        Perhaps I have overlooked something (although I did spent much
        time to resolve the problem).

Repeat-By:
	The script (named x) I use to demonstrate the problem :

#!/bin/bash
 let LINENUMBER=0
 egrep -v  "^#|^ *$"  $1                                        |     \
 (while read  LINE  REST
 do
     let LINENUMBER=$LINENUMBER+1
     echo "$LINENUMBER   $LINE   $REST"
 done )
 echo "Total numbers of line : $LINENUMBER"
 exit 0

	The command to show the problem :

bash -v x /etc/resolv.conf

	The output I get on the screen :

#!/bin/bash
 let LINENUMBER=0
 egrep -v  "^#|^ *$"  $1                                        |     \
 (while read  LINE  REST
 do
     let LINENUMBER=$LINENUMBER+1
     echo "$LINENUMBER   $LINE   $REST"
 done )
1   domain   mobach.nl
2   search   mobach.nl mobach.com
3   nameserver   172.16.21.73
4   nameserver   172.16.21.12
5   nameserver   172.16.21`39
6   nameserver   172.16.21.210
 echo "Total numbers of line : $LINENUMBER"
Total numbers of line : 0
 exit 0

Fix:
	Sorry, I don't master the bash sources. I'm not a C programmer also :-(.

Regards,

Fred


From jspires@amcc.com Tue Dec 26 17:37:36 2000
Received: from [192.195.69.168] (helo=hadar.amcc.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14B2it-0008TF-00
	for <bug-bash@gnu.org>; Tue, 26 Dec 2000 17:37:36 -0500
Received: from SMTP (mailhost.amcc.com [192.195.69.30]) by
          hadar.amcc.com (Netscape Messaging Server 4.15) with SMTP id
          G675HZ00.K2F for <bug-bash@gnu.org>; Tue, 26 Dec 2000 14:37:11 -0800 
Received: from amcc.com ([206.113.37.191]) by 192.195.69.30
  (Norton AntiVirus for Internet Email Gateways 1.0) ;
  Tue, 26 Dec 2000 22:37:23 0000 (GMT)
Message-ID: <3A491C53.D735796B@amcc.com>
Date: Tue, 26 Dec 2000 17:31:47 -0500
From: Jeff Spires <jspires@amcc.com>
Organization: Applied Micro Circuits Corp.
X-Mailer: Mozilla 4.72 [en] (X11; U; SunOS 5.6 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: bug-bash@gnu.org
Subject: Error when using getopts in a function
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/>

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 
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/zlib/1.1.3/include
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/libjpeg/6b/include
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/libpng/1.0.5/include
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/tiff/3.5.4/include
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/freetype/1.3.1/include
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/libungif/4.1.0b1/include -I.  -I. -I./lib
-I/user/adc/shr/ut/export/sparc-sun-solaris2.6/t/bash/2.03/include -g -O2
uname output: SunOS cairo 5.6 Generic_105181-10 sun4u sparc SUNW,Ultra-5_10
Machine Type: sparc-sun-solaris2.6

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

Description:
	The getopts shell builtin uses the OPTIND variable to keep
	track of the next argument to be processed. When all the
	options have been processed, OPTIND is generally used to
	shift the options out of the argument list. Bash does not
	reset OPTIND when a function exits, so calling the same
	function multiple times will result in the argument list
	being parsed incorrectly (e.g. options are skipped or
	arguments are incorrectly shifted out of the argument list).

Repeat-By:
	Use the following function:
	
	function foo {
          let hide=0

          while getopts ":h" OPTION; do
            case $OPTION in
              h )   let hide=1;;
            esac
          done
          shift $((OPTIND - 1))

          if (( hide )); then
            echo "i'm not going to show you arg 1"
          else
            echo "arg 1 = :$1:"
          fi
        }
        
        Run this several times from the command line with 'foo bar'.
        As you would expect, the function reports the first argument
        correctly. Now run this several times with 'foo -q bar'. You
        would expect the function to hide the first argument every
        time, but after running the function with the -q option once,
        it fails to work on subsequent runs. Check OPTIND. It is
        set to 2 which causes getopts to skip over the -q, and shift
        removes the option from the command line.

Fix:
	I don't know how ksh and zsh handle the OPTIND variable, but
	both shells seem to work.

-- 
Jeff Spires                                      Phone: (978) 247-8068
Applied Micro Circuits Corp.                     Fax:   (978) 623-0024



From chet@nike.ins.cwru.edu Wed Dec 27 11:52:46 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BJok-0006vA-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 11:52:46 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA08388; Wed, 27 Dec 2000 11:52:42 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 11:51:40 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: jtreleaven@my-deja.com
Subject: Re: ksh FPATH functionality
Cc: chet@nike.INS.CWRU.Edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227165140.AA90093.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 jtreleaven@my-deja.com of Sat, 23 Dec 2000 00:03:20 GMT (id <920q45$41g$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/>

> Is anyone working on adding ksh's FPATH to bash?  Is there some way to
> get this type of functionality using bash's facilities - that I do not
> know about?

Look at examples/functions/{autoload,autoload.v2,autoload.v3}

-- 
``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 Dec 27 11:54:37 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BJqX-0006xA-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 11:54:37 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA08740; Wed, 27 Dec 2000 11:54:33 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 11:53:51 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: ogoldshmidt@comgates.co.il
Subject: Re: bash does not recognize filenames with spaces unless root/su
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227165351.AA90159.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 ogoldshmidt@comgates.co.il of Tue, 26 Dec 2000 18:13:29 +0200 (id <200012261613.eBQGDTZ01088@erwin.comgates.co.il>)
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-redhat-linux-gnu
> 
> Bash Version: 2.04
> Patch Level: 11
> Release Status: release
> 
> Description:
> 	[Detailed description of the problem, suggestion, or complaint.]
> 
> On an i686 running Red Hat Linux 7.0 bash cannot recognize
> filenames or directories that have spaces, unless I am root/su.
> This does not happen in ksh, zsh, or tcsh, so it looks like a bug 
> in bash.

No.  It looks like you have a function for `cd' that doesn't properly
quote its arguments.

-- 
``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 Dec 27 11:57:34 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BJtO-00070X-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 11:57:34 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA06919; Wed, 27 Dec 2000 11:56:16 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 11:54:54 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: fred@mobach.nl
Subject: Re: Perhaps variables are re-initialized after a while loop
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227165454.AA90169.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 fred@mobach.nl of Tue, 26 Dec 2000 22:58:09 +0100 (id <200012262158.WAA09848@servans.mobach.nl>)
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.03
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	In the example below I have initialized a variable LINENUMBER
>         with the value zero. Then I enter a loop to process a number
>         of lines. In the loop the variable LINENUMBER is output.
>         After the end of the loop the variable is reset to the initial
>         value.

I don't see how you can expect any result other than what you got, since
you ran the while loop in a subshell.  A subshell cannot affect its
parent's environment.

Read the Bash FAQ, question E4.

> 	The script (named x) I use to demonstrate the problem :
> 
> #!/bin/bash
>  let LINENUMBER=0
>  egrep -v  "^#|^ *$"  $1                                        |     \
>  (while read  LINE  REST
>  do
>      let LINENUMBER=$LINENUMBER+1
>      echo "$LINENUMBER   $LINE   $REST"
>  done )
>  echo "Total numbers of line : $LINENUMBER"
>  exit 0

-- 
``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 Dec 27 11:57:55 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BJtj-00070j-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 11:57:55 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id LAA07058; Wed, 27 Dec 2000 11:57:51 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 11:56:27 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: jspires@amcc.com
Subject: Re: Error when using getopts in a function
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227165627.AA90185.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 jspires@amcc.com of Tue, 26 Dec 2000 17:31:47 -0500 (id <3A491C53.D735796B@amcc.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.6
> 
> Bash Version: 2.03
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	The getopts shell builtin uses the OPTIND variable to keep
> 	track of the next argument to be processed. When all the
> 	options have been processed, OPTIND is generally used to
> 	shift the options out of the argument list. Bash does not
> 	reset OPTIND when a function exits, so calling the same
> 	function multiple times will result in the argument list
> 	being parsed incorrectly (e.g. options are skipped or
> 	arguments are incorrectly shifted out of the argument list).

And documents the behavior, which is required by POSIX.  Functions and
their callers share the same variables.

The manual page says

	The shell does not reset
	.SM
	.B OPTIND
	automatically; it must be manually reset between multiple
	calls to
	.B getopts
	within the same shell invocation if a new set of parameters
	is to be used.

-- 
``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 Dec 27 12:56:45 2000
Received: from kanga.ins.cwru.edu ([129.22.8.32])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BKoe-0001W4-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 12:56:44 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by kanga.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id MAA21539; Wed, 27 Dec 2000 12:55:22 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 12:48:33 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: djkea2@mugca.cc.monash.edu.au
Subject: Re: compgen kills shell
Cc: chet@nike.INS.CWRU.Edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227174833.AA91102.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 djkea2@mugca.cc.monash.edu.au of Wed, 27 Dec 2000 00:43:00 +1100 (id <92a6cv$r09$1@spacebar.ucc.usyd.edu.au>)
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/>

> This dumps core and kills the shell, however, if you filter the diff 
> through an equivalent sed command it doesn't. Hmmmm.....

I can't reproduce it with my current development version.
> 
> compgen -W "$( diff <( compgen -A variable ) <( compgen -A export )\
> | awk '{ print $2 }' )"

Since the lists are sorted, wouldn't `cmp' be an easier way to do this
instead of diff/awk?

-- 
``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 Dec 27 13:07:31 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BKz4-0001gP-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 13:07:30 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id NAA23128; Wed, 27 Dec 2000 13:07:27 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Wed, 27 Dec 2000 12:57:21 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: alphanum@libero.it
Subject: Re: decode_prompt_string () bug in octal expansion
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001227175721.AA91174.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 ralph@alesaismaphia.myip.org of Fri, 22 Dec 2000 04:53:10 +0100 (CET) (id <20001222035310.2BCBCE0917@alesaismaphia.myip.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/>

> Machine Type: i586-pc-linux-gnu
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 	in decode_prompt_string () (file parse.y line 3005) when expanding
> 	octal sequences, you assume 
> 	> string += 3;

Since the documented sequence is three characters long.

> 	if the octal sequence isn't 3 bytes long and the octal is at the end 
> 	of *string, the end of *string ('\0') is skipped, so the prompt will
> 	be broken (heap inspection)

Well, it seems like kind of an easy mistake to make.  I'll fix it.

-- 
``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 utx@penguin.cz Wed Dec 27 17:01:28 2000
Received: from smtp2.volny.cz ([212.20.96.11])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BOdU-0001ol-00
	for <bug-bash@gnu.org>; Wed, 27 Dec 2000 17:01:28 -0500
Received: from utx.cz (datelb-1-6-22.dialup.vol.cz [212.20.102.88])
	by smtp2.volny.cz (8.9.3/8.9.3) with ESMTP id XAA88374;
	Wed, 27 Dec 2000 23:00:54 +0100 (CET)
Received: (from sb@localhost)
	by utx.cz (8.10.2/8.10.2) id eBN120e04433;
	Sat, 23 Dec 2000 02:02:00 +0100
Date: Sat, 23 Dec 2000 02:01:59 +0100
From: Stanislav Brabec <utx@penguin.cz>
To: chet@po.CWRU.Edu
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Subject: Re: bash/set - bad expansion for function while used as input
Message-ID: <20001223020159.A4371@utx.cz>
References: <1001221171754.AA57316.SM@nike.INS.CWRU.Edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <1001221171754.AA57316.SM@nike.INS.CWRU.Edu>; from chet@nike.INS.CWRU.Edu on Thu, Dec 21, 2000 at 12:17:54PM -0500
X-Accept-Language: cs, sk, en
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/>

On Thu, Dec 21, 2000 at 12:17:54PM -0500, Chet Ramey wrote:
> > Bash Version: 2.04
> > Patch Level: 0
> > Release Status: release
> >                                    =20
> > Description:
> >        set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
> >               Without options, the name and value of each shell variable
> >               are displayed in a format that  can be  reused  as input.
> 
> What solution do users prefer?  POSIX.2 says only variables should be
> printed, but printing functions seems like a reasonable thing to do.
> How about printing only variables in POSIX mode, and printing functions
> (but not as pseudo-assignment statements) when not in POSIX mode?
> 

I like functionallity "as is", but I have complained about unusability
of output of functions. I am adding small patch, which solves my problem
- if var is a function, it will not be dumped as

fnc=()
{
foo
}

but in format

fnc()
{
foo
}

which is reusable. But I don't know, if there's some standard, which
can be broken by my patch. With this patch following script gives
intuitivelly expected empty output.

-------------
#! /bin/bash
function bad_func()
{
  echo `echo This should not be printed!`
}
set >bad_func_dump
function bad_func()
{
  This is fuzzy!
}
. bad_func_dump 2>/dev/null
set
-------------


-- 
Stanislav Brabec


--- bash-2.04/variables.c.orig	Tue Mar 14 17:36:18 2000
+++ bash-2.04/variables.c	Sat Dec 23 01:42:07 2000
@@ -793,7 +793,7 @@
 {
   if (function_p (var) && var->value)
     {
-      printf ("%s=", var->name);
+      printf ("%s", var->name);
       print_var_function (var);
       printf ("\n");
     }


From pw@osc.edu Thu Dec 28 12:50:37 2000
Received: from quasar.osc.edu ([192.148.249.15])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BhCG-0006Af-00
	for <bug-bash@gnu.org>; Thu, 28 Dec 2000 12:50:36 -0500
Received: (from pw@localhost)
	by quasar.osc.edu (8.9.3/8.9.3) id MAA11121;
	Thu, 28 Dec 2000 12:50:35 -0500
Date: Thu, 28 Dec 2000 12:50:35 -0500
From: Pete Wyckoff <pw@osc.edu>
To: bug-bash@gnu.org
Subject: Can't get rid of 'v' mapping in vi mode
Message-ID: <20001228125035.D8762@quasar.osc.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.12i
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: 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 crag 2.4.0-test11 #4 SMP Mon Nov 27 17:07:35 PST 2000 i686 unknown
Machine Type: i386-redhat-linux-gnu

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

Description:
    Bash maps 'v' to vi_edit_and_execute_command in the vi_movement_keymap,
    which bothers me considerably.  I can't seem to get rid of it through
    any manipulations to $INPUTRC, perhaps because that is processed before
    the 'v' mapping is added.

    Is there any way to disable this short of hacking and recompiling bash?


From chet@nike.ins.cwru.edu Thu Dec 28 13:01:42 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14BhMz-0006jE-00
	for <bug-bash@gnu.org>; Thu, 28 Dec 2000 13:01:41 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id NAA14043; Thu, 28 Dec 2000 13:01:36 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Thu, 28 Dec 2000 12:52:52 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: pw@osc.edu
Subject: Re: Can't get rid of 'v' mapping in vi mode
Cc: bug-bash@gnu.org, chet@nike.INS.CWRU.Edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001228175252.AA15943.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 pw@osc.edu of Thu, 28 Dec 2000 12:50:35 -0500 (id <20001228125035.D8762@quasar.osc.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/>

> Machine Type: i386-redhat-linux-gnu
> 
> Bash Version: 2.04
> Patch Level: 11
> Release Status: release
> 
> Description:
>     Bash maps 'v' to vi_edit_and_execute_command in the vi_movement_keymap,
>     which bothers me considerably.  I can't seem to get rid of it through
>     any manipulations to $INPUTRC, perhaps because that is processed before
>     the 'v' mapping is added.
> 
>     Is there any way to disable this short of hacking and recompiling bash?

bind -m vi-move 'v:self-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 Thu Dec 28 13:36:29 2000
Received: from obsidian.ins.cwru.edu ([129.22.8.232])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14Bhuf-00080U-00
	for <bug-bash@gnu.org>; Thu, 28 Dec 2000 13:36:29 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by obsidian.INS.CWRU.Edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id NAA25276; Thu, 28 Dec 2000 13:36:18 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Thu, 28 Dec 2000 13:34:02 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: pw@osc.edu
Subject: Re: Can't get rid of 'v' mapping in vi mode
Cc: chet@nike.INS.CWRU.Edu, bug-bash@gnu.org
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001228183402.AA17267.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 pw@osc.edu of Thu, 28 Dec 2000 13:13:05 -0500 (id <20001228131305.C11124@quasar.osc.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/>

> chet@nike.INS.CWRU.Edu said:
> > bind -m vi-move 'v:self-insert'
> 
> Thanks!  I've never played with "bind", but will enjoy it henceforth.

That was just an example; you probably want

bind -m vi-move -r 'v'

to remove the binding.

-- 
``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 porton@perm.raid.ru Fri Dec 29 15:37:13 2000
Received: from ns4.raid.ru ([212.33.224.131] helo=main.raid.ru)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14C6H2-0002iF-00
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 15:37:13 -0500
Received: from localhost.perm.raid.ru (dial-up-line-8.raid.ru [212.33.224.8])
	by main.raid.ru (8.9.3/8.9.3) with ESMTP id BAA16870
	for <bug-bash@gnu.org>; Sat, 30 Dec 2000 01:37:02 +0500 (ES)
Received: from porton.perm.raid.ru (localhost [127.0.0.1])
	by localhost.perm.raid.ru (Postfix) with ESMTP id DA89D13349
	for <bug-bash@gnu.org>; Sat, 30 Dec 2000 00:08:32 +0500 (YEKT)
X-Mailer: exmh version 2.2 07/20/2000 with nmh-0.27
To: bug-bash@gnu.org
Subject: A suggestion for the future version of Bash
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 30 Dec 2000 00:08:31 +0500
From: Victor Porton <porton@perm.raid.ru>
Message-Id: <20001229190832.DA89D13349@localhost.perm.raid.ru>
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/>

It would be good to have possibility to print something before each 
interactive command line execution. This can be done by adding the new shell 
variable BEFORECOMMAND with commands which should be executed before every 
user-entered command line.

We can use this for example to colorize prompts and user commands to two 
different colors (both different from output color) on color terminals. It is 
the reason why I want this feature.
-- 
Victor Porton (porton@perm.raid.ru; http://porton.narod.ru)




From prj@multivac.cwru.edu Fri Dec 29 15:56:32 2000
Received: from multivac.student.cwru.edu ([129.22.239.69] helo=multivac.cwru.edu)
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14C6Zj-0003rg-00
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 15:56:31 -0500
Received: (qmail 27267 invoked by uid 500); 29 Dec 2000 20:56:50 -0000
Mail-Followup-To: bug-bash@gnu.org,
  porton@perm.raid.ru
To: Victor Porton <porton@perm.raid.ru>
Cc: bug-bash@gnu.org
Subject: Re: A suggestion for the future version of Bash
References: <20001229190832.DA89D13349@localhost.perm.raid.ru>
From: prj@po.cwru.edu (Paul Jarc)
Date: 29 Dec 2000 15:56:27 -0500
In-Reply-To: Victor Porton's message of "Sat, 30 Dec 2000 00:08:31 +0500"
Message-ID: <m366k37xpq.fsf@multivac.student.cwru.edu>
Lines: 11
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
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/>

Victor Porton <porton@perm.raid.ru> writes:
> It would be good to have possibility to print something before each 
> interactive command line execution. This can be done by adding the new shell 
> variable BEFORECOMMAND with commands which should be executed before every 
> user-entered command line.

If I understand you, this functionality is already available in the
PROMPT_COMMAND variable and command substitution in PS1.


paul


From chet@nike.ins.cwru.edu Fri Dec 29 16:36:11 2000
Received: from po.cwru.edu ([129.22.4.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14C7C7-0005EI-00
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 16:36:11 -0500
Received: from nike.INS.CWRU.Edu (nike.INS.CWRU.Edu [129.22.8.219]) by po.cwru.edu with SMTP (8.8.8+cwru/CWRU-3.6)
	id QAA13941; Fri, 29 Dec 2000 16:36:07 -0500 (EST) (from chet@nike.INS.CWRU.Edu)
Date: Fri, 29 Dec 2000 16:35:26 -0500
From: Chet Ramey <chet@nike.INS.CWRU.Edu>
To: porton@perm.raid.ru
Subject: Re: A suggestion for the future version of Bash
Cc: bug-bash@gnu.org, chet@po.cwru.edu
Reply-To: chet@po.CWRU.Edu
Message-ID: <1001229213526.AA28703.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 porton@perm.raid.ru of Sat, 30 Dec 2000 00:08:31 +0500 (id <20001229190832.DA89D13349@localhost.perm.raid.ru>)
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/>

> It would be good to have possibility to print something before each 
> interactive command line execution. This can be done by adding the new shell 
> variable BEFORECOMMAND with commands which should be executed before every 
> user-entered command line.

Do you mean before each line of a possible multi-line command?  If not,
I don't see why $PROMPT_COMMAND cannot be made to work for this.

-- 
``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 harris@devlinux7.bedford.progress.com Fri Dec 29 16:47:20 2000
Received: from pscgate.progress.com ([192.77.186.1])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14C7Mt-0005pG-00
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 16:47:19 -0500
Received: from elvirus.progress.com (elvirus [192.77.186.100])
	by pscgate.progress.com (8.10.2/8.10.2/PSC-4.01) with ESMTP id eBTLlIO18791
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 16:47:18 -0500 (EST)
Received: from progress.COM (localhost [127.0.0.1])
	by elvirus.progress.com (8.10.2/8.10.2/PSC-4.01) with ESMTP id eBTLn5j20855
	for <bug-bash@gnu.org>; Fri, 29 Dec 2000 16:49:05 -0500 (EST)
Received: from devlinux7.bedford.progress.com (devlinux7 [172.16.7.193]) by progress.COM (8.7.2/PSC-1.0) with ESMTP id QAA00309 for <bug-bash@gnu.org>; Fri, 29 Dec 2000 16:47:17 -0500 (EST)
Received: (from harris@localhost)
	by devlinux7.bedford.progress.com (8.11.0/8.9.3) id eBTLk1G27108;
	Fri, 29 Dec 2000 16:46:01 -0500
Date: Fri, 29 Dec 2000 16:46:01 -0500
From: John Harris <harris@devlinux7.bedford.progress.com>
Message-Id: <200012292146.eBTLk1G27108@devlinux7.bedford.progress.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: 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 devlinux7 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
Machine Type: i386-redhat-linux-gnu

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

Description:
	The behavior of bash differs from Bourne and Korn shells when
	handling syntax such as "variable=value . script".  I'm not
	sure how to describe it in detail - but the behavioral change
	from Bourne/Korn shell to Bash is exhibited in the test scripts
	attached to this bug report.

	The impact to us is that bourne shell scripts using the above
	syntax on man Unix platforms fail on Redhat Linux which uses
	bash as it's default command interpreter (symlink to /bin/sh).

Repeat-By:
	Run the following script "bashtest" using a Bourne or Korn shell.
	Then run it again using bash v2.x and observe the different
	behavior.

	------- cut -------
	:
	# bashtest
	#
	# Correct output (from Bourne or Korn shell):
	#bashtest: one before: 1
	#bashtest: two before: 
	#bashtest2: one before: one
	#bashtest2: two before: 1
	#bashtest3:  one before: two
	#bashtest3:  two before: two
	#bashtest4a: one: 
	#bashtest4a: two: 
	#bashtest4b: one: 
	#bashtest4b: two: 
	#bashtest3:  one after:  3
	#bashtest3:  two after:  3
	#bashtest2: one after:  3
	#bashtest2: two after:  3
	#bashtest: one after:  3
	#bashtest: two after:  3

	one=1
	echo "bashtest: one before: $one"
	echo "bashtest: two before: $two"
	one=one two=1 . bashtest2
	echo "bashtest: one after:  $one"
	echo "bashtest: two after:  $two"

	------- cut ------- 
	:
	# bashtest2
	echo "bashtest2: one before: $one"
	echo "bashtest2: two before: $two"
	one=two two=two . bashtest3
	echo "bashtest2: one after:  $one"
	echo "bashtest2: two after:  $two"

	------- cut ------- 
	:
	# bashtest3
	echo "bashtest3:  one before: $one"
	echo "bashtest3:  two before: $two"
	bashtest4a
	one=3
	two=3
	bashtest4b
	echo "bashtest3:  one after:  $one"
	echo "bashtest3:  two after:  $two"

	------- cut ------- 
	:
	# bashtest4a
	echo "bashtest4a: one: $one"
	echo "bashtest4a: two: $two"

	------- cut ------- 
	:
	# bashtest4b
	echo "bashtest4b: one: $one"
	echo "bashtest4b: two: $two"



From porton@perm.raid.ru Sat Dec 30 01:53:47 2000
Received: from ns4.raid.ru ([212.33.224.131] helo=main.raid.ru)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14CFtj-0002hp-00
	for <bug-bash@gnu.org>; Sat, 30 Dec 2000 01:53:47 -0500
Received: from localhost.perm.raid.ru (dial-up-line-76.raid.ru [212.33.224.76])
	by main.raid.ru (8.9.3/8.9.3) with ESMTP id LAA21937;
	Sat, 30 Dec 2000 11:53:39 +0500 (ES)
Received: from porton.perm.raid.ru (localhost [127.0.0.1])
	by localhost.perm.raid.ru (Postfix) with ESMTP
	id D043B13366; Sat, 30 Dec 2000 04:54:05 +0500 (YEKT)
X-Mailer: exmh version 2.2 07/20/2000 with nmh-0.27
To: prj@po.cwru.edu (Paul Jarc), Chet Ramey <chet@nike.INS.CWRU.Edu>
Cc: bug-bash@gnu.org
Subject: Re: A suggestion for the future version of Bash 
In-Reply-To: Your message of "29 Dec 2000 15:56:27 EST."
             <m366k37xpq.fsf@multivac.student.cwru.edu> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 30 Dec 2000 04:54:05 +0500
From: Victor Porton <porton@perm.raid.ru>
Message-Id: <20001229235405.D043B13366@localhost.perm.raid.ru>
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 wrote:
> > It would be good to have possibility to print something before each 
> > interactive command line execution. This can be done by adding the new shell 
> > variable BEFORECOMMAND with commands which should be executed before every 
> > user-entered command line.

Paul Jarc answered:
> If I understand you, this functionality is already available in the
> PROMPT_COMMAND variable and command substitution in PS1.

Chet Ramey:
>Do you mean before each line of a possible multi-line command?  If not,
>I don't see why $PROMPT_COMMAND cannot be made to work for this.

No! PROMPT_COMMAND is executed right before printing PS1 but I mean to execute 
 BEFORECOMMAND right before of _executing_ of every user's command.

-- 
Victor Porton (porton@perm.raid.ru; http://porton.narod.ru)




From marketing@netoneplus.com Sun Dec 31 14:04:35 2000
Received: from jxmls04.se.mediaone.net ([24.129.0.51])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14CnmV-0007sh-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 31 Dec 2000 14:04:35 -0500
Received: from prep.ai.mit.edu (dbe114-124.jacksonville.net [24.129.114.124] (may be forged))
	by jxmls04.se.mediaone.net (8.8.7/8.8.7) with SMTP id NAA03832
	for <bug-bash@prep.ai.mit.edu>; Sun, 31 Dec 2000 13:59:31 -0500 (EST)
Date: Sun, 31 Dec 2000 13:59:31 -0500 (EST)
From: marketing@netoneplus.com
Message-Id: <200012311859.NAA03832@jxmls04.se.mediaone.net>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="=200012310935="
To: bug-bash@prep.ai.mit.edu
X-Mailer: 65F7231D.1A34CF05.ed480b4a665bd006e399b3a7bf477b5d
Subject: Information on your website
Organization: Net One Plus
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/>

--=200012310935=
Content-Type: text/html;charset=US-ASCII

<html>

<head>
<title>Net 1 One Plus- www.netoneplus.com</title>
</head>

<body>

<center>
<p><font color="#FFFFFF">If you are unable to view this page, please go to&nbsp;
www.netoneplus.com</font><a href="http://www.netoneplus.com"><font face="Arial"><br>
www.netoneplus.com</font></a></p>
<table border="0" cellPadding="0" cellSpacing="0" width="640">
  <tbody>
    <tr>
      <td bgColor="#000000" width="34%">
        <p align="center"><b><font color="#ffffff" face="Arial" size="4">&nbsp;</font></b></p>
      </td>
      <td bgColor="#000000" width="33%"><font face="Arial"><map name="FPMap0">
        <area href="http://www.netoneplus.com" shape="rect" coords="2, 2, 191, 60"></map><img border="0" src="http://netoneplus.com/emails/images/swooshlogo.jpg" width="192" height="61" usemap="#FPMap0"><br>
        <b><font color="#ffffff" size="4"><a href="http://www.netoneplus.com" style="COLOR: #ffffff">www.netoneplus.com</a></font></b></font></td>
      <td bgColor="#000000" width="33%"><font face="Arial">&nbsp;</font></td>
    </tr>
    <tr>
      <td colSpan="3" width="100%">
        <table border="0" cellPadding="0" cellSpacing="0" width="640">
          <tbody>
            <tr>
              <td bgColor="#000000" width="10"><font face="Arial">.</font></td>
              <td width="620">
                <table border="0" cellPadding="2" width="100%">
                  <tbody>
                    <tr>
                      <td width="28%">
                        <p align="center"><font face="Arial"><img border="0" src="http://netoneplus.com/emails/images/ladytyping.gif" width="128" height="128"><b><font color="#0000ff"><a href="http://www.netoneplus.com" style="color: #0000FF"><br>
                        Obtain&nbsp; free <br>
                        Web hosting!</a></font></b></font></p>
                      </td>
</center>

                      <td width="72%">
                        <table border="0" width="100%">
                          <tr>
                            <td width="100%">
                              <p align="right"><b><a href="http://www.netoneplus.com" style="COLOR: #ff0000"><font color="#ff0000" size="5" face="Arial">Why
                              pay for web hosting?</font></a></b></td>
                          </tr>
                          <tr>
                            <td width="100%">
                              <p align="right"><font color="#FFFFFF" face="Arial">1</font></td>
                          </tr>
                          <tr>
                            <td width="100%">
                              <p align="right"><b><font face="Arial">Receive a 6
                              page website, 3 years of&nbsp;<br>
 domain name registrations <u>and</u>
                              1 year of hosting!</font></b></td>
                          </tr>
                          <tr>
                            <td width="100%">
                              <p align="right"><font size="2" face="Arial">(<a href="http://www.netoneplus.com" style="color: #0000FF">click
                              here for more information</a>)</font></td>
                          </tr>
                        </table>

<center>
                        </center>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <table border="0" cellPadding="0" cellSpacing="0" width="100%">
                  <tbody>
                    <tr>
                      <td width="50%">
                        <p align="center"><font face="Arial"><font size="4"><font color="#FF0000"><b><u><a href="http://" style="color: #FF0000">FREE
                        hosting</a></u></b></font> is available <br>
                        to your website!</font><br>
                        <font size="2">(<a href="http://www.netoneplus.com" style="color: #0000FF">click
                        here for more information</a>)</font></font></p>
                        <p align="center"><font face="Arial"><font size="4">Or,
                        if you are looking to start your<br>
                        own website we have <br>
                        &quot;<font color="#0000FF"><b><a href="http://www.netoneplus.com" style="color: #0000FF">The
                        Complete Choice!</a></b></font>&quot;</font><br>
                        <font size="2">(<a href="http://www.netoneplus.com" style="color: #0000FF">click
                        here for more information</a>)</font><br>
                        </font></p>
                      </td>
                      <td bgColor="#dad7c2" borderColor="#00b2eb" width="50%">
                        <p align="center"><b><font face="Arial" size="4">Hosting
                        made easy!</font></b></p>
                        <div align="center">
                          <table bgColor="#dad7c2" border="1" borderColor="#000000" cellPadding="0" cellSpacing="0" width="94%">
                            <tbody>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Domain
                                  Registration</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">E-Mail
                                  Forwarding</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Multiple
                                  Access Connections</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">Unlimited
                                  Updates<br>
                                  Via FTP</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">E-Mail
                                  Auto&nbsp;<br>
                                  responders</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">MS
                                  FrontPage extensions</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Web
                                  Based&nbsp;<br>
                                  Control Panel</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">Detailed
                                  Web&nbsp;<br>
                                  Usage Page</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Access
                                  to Raw Log Files</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">Your
                                  own local&nbsp;<br>
                                  &quot;cgibin&quot; dir</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">SSL
                                  Secure Server</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">99%
                                  uptime</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Guest
                                  book</font></td>
                                <td width="50%"><font class="copy" face="Arial" size="2">Email
                                  Forms</font></td>
                              </tr>
                              <tr>
                                <td width="50%"><font class="copy" face="Arial" size="2">Search
                                  Engine Registration</font></td>
                                <td width="50%"><font face="Arial" size="2">Unlimited
                                  POP<br>
                                  Email Accounts&nbsp;</font></td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                        <p align="center"><font face="Arial"><a href="http://www.netoneplus.com" style="color: #0000FF">And
                        much much more</a>!</font></p>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <p align="center"><font face="Arial"><font size="4"><a href="http://www.netoneplus.com" style="color: #0000FF">www.netoneplus.com</a></font><br>
                <font color="#ffffff">i</font></font></p>
              </td>
              <td bgColor="#000000" width="10"><font face="Arial">&nbsp;.</font></td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
    <tr>
      <td bgColor="#000000" colSpan="3" width="100%">
        <p align="center"><font color="#ffffff" face="Arial" size="2">If you
        feel that you have received this email in error,<br>
        please reply to <a href="mailto:remove@netoneplus.com" style="COLOR: #ffffff">remove@netoneplus.com</a>
        with just the word remove in the subject line.</font></p>
      </td>
    </tr>
  </tbody>
</table>

</body>

</html>

--=200012310935=--



From news@iac5.navix.net Sun Dec 31 16:59:57 2000
Received: from chx400.switch.ch ([130.59.10.2])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14CqWD-0006Wo-00
	for <bug-bash@prep.ai.mit.edu>; Sun, 31 Dec 2000 16:59:57 -0500
Received: from iac5.navix.net ([207.91.5.10])
	by chx400.switch.ch with esmtp (Exim 3.20 #1)
	id 14CqWB-0005Og-00
	for gnu-bash-bug@moderators.isc.org; Sun, 31 Dec 2000 22:59:55 +0100
Received: (from news@localhost)
	by iac5.navix.net (8.9.3/8.8.5) id PAA11228
	for gnu-bash-bug@moderators.isc.org; Sun, 31 Dec 2000 15:59:39 -0600 (CST)
To: gnu-bash-bug@moderators.isc.org
Path: not-for-mail
From: Roger <roger@nospamfilter-linuxfreemail.com>
Newsgroups: gnu.bash.bug
Subject: Bash News/Usenet Group (Is there just a plain...)
Date: Sun, 31 Dec 2000 17:00:27 -0500
Organization: na
Lines: 10
Message-ID: <92oa8a$arf$1@iac5.navix.net>
NNTP-Posting-Host: r-220.64.alltel.net
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8Bit
X-Trace: iac5.navix.net 978299978 11119 166.102.220.64 (31 Dec 2000 21:59:38 GMT)
X-Complaints-To: abuse@navix.net
NNTP-Posting-Date: 31 Dec 2000 21:59:38 GMT
User-Agent: KNode/0.3.3
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/>

eh, isn't there just a plain 'bash' news/usenet group somewhere.


<there's gotta be one!!!!>


-- 
Created with Linux Mandrake 7.2!
www.linux-mandrake.com
(remove 'nospamfilter-' in email to reply!)


From netch@iv.nn.kiev.ua Sun Dec 31 17:06:41 2000
Received: from segfault.kiev.ua ([193.193.193.4])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14Cqch-0006hQ-00
	for <bug-bash@gnu.org>; Sun, 31 Dec 2000 17:06:40 -0500
Received: (from uucp@localhost)
	by segfault.kiev.ua (8) with UUCP id ACN39796
	for bug-bash@gnu.org; Mon, 1 Jan 2001 00:06:32 +0200 (EET)
	(envelope-from netch@iv.nn.kiev.ua)
Received: (from netch@localhost)
	by iv.nn.kiev.ua (8.11.1/8.11.1) id eBVI8nU37468;
	Sun, 31 Dec 2000 20:08:49 +0200 (EET)
	(envelope-from netch)
Date: Sun, 31 Dec 2000 20:08:49 +0200 (EET)
Message-Id: <200012311808.eBVI8nU37468@iv.nn.kiev.ua>
From: netch@lucky.net (Valentin Nechayev)
To: bug-bash@gnu.org
Subject: bash in malloc(): error: recursive call - [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: i386
OS: freebsd5.0
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd5.0' -DCONF_MACHTYPE='i386--freebsd5.0' -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 iv.nn.kiev.ua 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Dec 10 10:26:00 EET 2000     root@iv.nn.kiev.ua:/usr/obj/usr/HEAD/src/sys/nn12  i386
Machine Type: i386--freebsd5.0

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

Description:

Screenshot:

netch@iv:~>jot 10000 | while read X; do sh -c 'echo GET | nc localhost 80 >/dev
/null 2>&1 &'; done
^C-bash in malloc(): error: recursive call.
Abort trap (core dumped)

Repeat-By:

See Description: (run command and press Ctrl-C)


From news@news01.syd.optusnet.com.au Sun Dec 31 18:13:11 2000
Received: from news1.mpx.com.au ([203.2.75.211] helo=news01.syd.optusnet.com.au)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14Crf4-0000fR-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sun, 31 Dec 2000 18:13:10 -0500
Received: (from news@localhost)
	by news01.syd.optusnet.com.au (8.9.3/8.9.3) id KAA09256;
	Mon, 1 Jan 2001 10:13:05 +1100
To: gnu-bash-bug@prep.ai.mit.edu
From: "ALEX" <alexspano@optusnet.com.au>
Newsgroups: gnu.bash.bug 
Subject: one million email addresses for $49.95(au)
Organization: www.wantedstuff.com
Message-ID: <36892.3861712963@news.optusnet.com.au>
X-Newsreader: Post News
Date: 31 Dec 2000 23:13:05 GMT
Lines: 5
NNTP-Posting-Host: 198.142.112.152
X-Trace: 978304385 news01.syd.optusnet.com.au 7485 198.142.112.152
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/>

1 000 000 addresses for $49.95(au) no duplicates and no .edu,.gov,.or support , help etc.
for further info just email me.
thanks alex



From news@monolith.news.easynet.net Sun Dec 31 21:35:35 2000
Received: from kumquat.mail.uk.easynet.net ([195.40.1.42])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14Cuox-0000QE-00
	for <gnu-bash-bug@prep.ai.mit.edu>; Sun, 31 Dec 2000 21:35:35 -0500
Received: from monolith.news.easynet.net ([195.40.1.49])
	by kumquat.mail.uk.easynet.net with esmtp (Exim 3.20 #1)
	id 14Cuoo-000MId-00
	for gnu-bash-bug@prep.ai.mit.edu; Mon, 01 Jan 2001 02:35:26 +0000
Received: by monolith.news.easynet.net (8.9.3+Sun/8.9.1) id CAA05216;
	Mon, 1 Jan 2001 02:35:26 GMT
To: gnu-bash-bug@prep.ai.mit.edu
Path: not-for-mail
From: gordon@ozcomputers.net
Newsgroups: gnu.bash.bug
Subject: Spambot Fodder, Dont Read  494
Lines: 3
Message-ID: <O1S36.128781$bp4.1743559@monolith.news.easynet.net>
Date: Mon, 01 Jan 2001 02:35:26 GMT
NNTP-Posting-Host: 195.40.196.50
X-Complaints-To: abuse@easynet.net
X-Trace: monolith.news.easynet.net 978316526 195.40.196.50 (Mon, 01 Jan 2001 02:35:26 GMT)
NNTP-Posting-Date: Mon, 01 Jan 2001 02:35:26 GMT
Organization: [posted via Easynet]
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/>

gordon@ozcomputers.net
ivcffemdhrwkexrrobpojtiurbgyjlrewfyxx


