delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/03/05:29:35

From: lmauro AT scientist DOT com (Leo Mauro)
Subject: RE: Help required - Connecting bash to an editor using anonymous pipes
3 Oct 1998 05:29:35 -0700 :
Message-ID: <000001bdee20$75cd12a0$1e6e31cf.cygnus.gnu-win32@leo-nt.rd.telesystech.com>
References: <3613D284 DOT 9E7D3B6 AT seri DOT co DOT uk>
Mime-Version: 1.0
To: <gnu-win32 AT cygnus DOT com>

On Thursday, October 01, 1998 03:06 PM,  Jonathan Naughton-Green wrote:

[SNIP]
> I am trying to connect the Cygnus environment to a MicroEmacs 
> editor to run a Cygnus shell in one of the buffer windows. I can do 
> this with the "command.com" to give me DOS prompt in a buffer,
> however applying the same technique to "bash" it does not quite
> work.
> 
> The window comes up. I can send characters to the shell and I
> can execute commands and see the results in the buffer BUT the
>bash prompt and the haracters that I type into the buffer are not
> visible.
[SNIP]

Bash (and every other UNIX shell I know) only produces its prompt
and echoes commands when running in "interactive" mode.  When
bash detects its stdin is not a terminal, it runs in non-interactive
(shell-script) mode where it just executes the commands with no
extra frills.  This is the same thing that happens when you run

	bash < shell-command-file

To force bash to run "interactive" even when stdin is not a terminal,
use the -i flag.  Try, for instance,

	bash -i < shell-command-file

and note the difference.


Leo Mauro
Principal Scientist
TeleSys Technologies, Inc.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019