Message-Id: <199803301137.NAA26326@ieva06.lanet.lv> From: "Andris Pavenis" To: djgpp AT delorie DOT com, Eli Zaretskii Date: Mon, 30 Mar 1998 14:35:19 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: "bash"ing "cat"s. Precedence: bulk Sorry, it looks that I forgot to add djgpp AT delorie DOT com to cc: or To: but only answered. ------- Forwarded Message Follows ------- From: Self To: Nate Eldredge Subject: Re: bash$ cat - Date: Wed, 25 Mar 1998 13:30:45 > Date: Tue, 24 Mar 1998 21:55:18 -0800 (PST) > To: Ned Ulbricht , djgpp AT delorie DOT com > From: Nate Eldredge > Subject: Re: bash$ cat - > At 01:33 3/23/1998 -0800, Ned Ulbricht wrote: > >(See below for cat/bash version info) > > > >When using cat within bash to read from stdin > > > >bash$ cat - > > > >then after terminating the input with ^Z (either keyboard ctrl-Z or F6), > >subsequent cat's from stdin > >result in cat returning immediately without accepting input. > [snip details] > >It seems to me that this is likely caused by the ^Z remaining buffered > >somewhere in the input stream and being resent to cat on the subsequent > >invocations under bash. > > That seems unlikely to me, since this doesn't happen with any other of the > textutils. (I checked.) Strange. I don't know whether to suspect `bash' or > `cat' here; `bash' seems more likely. I can't rebuild `bash' to debug it (no > Windows 95), so I guess someone else will have to. > > >(Aside from this, it seems from the list archive/DejaNews that Daisuke > >Aoyama hasn't posted since about last November. Is he or anyone else > >still working on a bash 2 port?) > > I don't have ftp, so I haven't checked, but I seem to remember hearing that > one was out. Check Simtelnet. > I remeber I met the same problem rather long time ago and that was not bash or DJGPP related (in DOS session under Win95). Here steps how to reproduce it (without BASH or DJGPP) 1) compile test program (I used Borland C++ 3.1 to avoid any link with DJGPP) Let us name it test1.c ( so we'll get test1.exe) #include #include int main (void) { char ch; while ((ch=fgetc(stdin))!=EOF) putch (ch); return 0; } 2) start FAR or Norton Commander in DOS session under Win95 3) run test1.exe and terminate input with Ctrl-Z 4) run test1.exe once more (for me it gets EOF IMMEDIATELLY) Andris Pavenis