From: jeffers AT redrose DOT net (David Jeffers) Subject: Re: Broken stdin? 26 Oct 1996 12:20:41 -0700 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199610261842.LAA04074.cygnus.gnu-win32@cygnus.com> References: <199610261318 DOT AA08022 AT mail DOT crl DOT com> Original-To: gnu-win32 AT cygnus DOT com In-Reply-To: <199610261318.AA08022@mail.crl.com> Original-Sender: owner-gnu-win32 AT cygnus DOT com >>>>> "Weiqi" == Weiqi Gao writes: >> ...... >> The shell script also returns without waiting for a response. >> The test.c program, however, does work correctly using the dos >> shell. I'd be grateful to learn how these programs perform on >> other users machines using bash. >> Weiqi> The bash shell (under Windows 95 at least) is broken in Weiqi> this respect. It interprets the enter key at the end of Weiqi> the command line as two enter keys. I posted a similar Weiqi> problem with "rm -i foo.bar" a couple of days ago. Weiqi> This has to be one of the DOS/UNIX CR-LF vs. LF problems. Weiqi> A remedy posted yesterday suggests using "Ctrl-J" key Weiqi> instead of "Enter". Weiqi> I also seem to remember with "less" in beta 14, when I want Weiqi> to leave it, I have to press "q, Enter" which exits the Weiqi> program and gives me FOUR prompts afterwards. This appears to be the case, although I got slightly better results using a c++ program: test.cc #include int main(void) { int a; cout << "Enter a value: "; cin >> a; cout << "The value is" << a; } This produces the following: $ Enter a value: <-----cursor should stop here. $ 10 $ The value is 10 So for some reason a carriage return is being automatically appended on the end of lines even when not requested. This should be easy to fix in the sources. Geoffrey? David Jeffers - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".