unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
Cc: Takaaki.Ota@am.sony.com, emacs-devel@gnu.org
Subject: Re: Broken lisp/Makefile.w32-in
Date: Thu, 5 Sep 2002 16:57:30 +0200 (IST)	[thread overview]
Message-ID: <Pine.SUN.3.91.1020905164917.18455B-100000@is> (raw)
In-Reply-To: <20020905081536.905C.LEKTU@terra.es>


On Thu, 5 Sep 2002, Juanma Barranquero wrote:

> On Thu, 5 Sep 2002 07:08:09 +0200 (IST), Eli Zaretskii <eliz@is.elta.co.il> wrote:
> 
> > How about if you invoke command.com explicitly, like this:
> > 
> > 	command.com /c for .... >>foo.txt
> 
> I'll have to test it tonight at home, but I don't see how could it work,
> because, as my example .BAT file showed, the bug with "for", "if" and
> redirection happens also in the command line (or at least inside a .BAT
> file) and is not related to nmake.

I'm guessing you are unaware of how ugly things can get with COMMAND.COM 
when redirection of built-in commands and especially batch files is 
involved.  For starters, you cannot redirect output of a batch file
at all(!).  Try it:

  C:\> type foo.bat
  echo Hi there
  C:\> foo > foo.txt
  Hi there
  C:\>

In other words, the output of `echo' still goes to the screen even though 
you've redirected it to foo.txt.  Now try this, and observe the change:

  C:\> command.com /c foo.bat > foo.txt

I suspect that something similar might happen with a FOR loop.

When you invoke "command.com /c ... >>foo.txt", the situation is 
different: here, the subsidiary COMMAND.COM does not redirect any output 
of FOR.  Instead, it is invoked by the parent shell with its stdout 
already redirected to a file.  Since COMMAND.COM is just a program, not a 
batch file or internal command like FOR, redirection of its output works 
much more reliably.

  parent reply	other threads:[~2002-09-05 14:57 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-31  6:59 Broken lisp/Makefile.w32-in Tak Ota
2002-07-31  7:51 ` Juanma Barranquero
2002-08-01 16:52   ` Richard Stallman
2002-08-01 17:14     ` Juanma Barranquero
2002-07-31  8:04 ` Juanma Barranquero
2002-08-30 12:14 ` Juanma Barranquero
2002-08-30 19:06   ` Eli Zaretskii
2002-08-30 23:47     ` Kim F. Storm
2002-08-31 23:24     ` Juanma Barranquero
2002-09-01  5:11       ` Eli Zaretskii
2002-09-01 21:10         ` Juanma Barranquero
2002-08-31 23:25     ` Juanma Barranquero
2002-09-01  5:15       ` Eli Zaretskii
2002-09-01 19:58         ` Juanma Barranquero
2002-09-01 16:59           ` Eli Zaretskii
2002-09-02  6:18             ` Juanma Barranquero
2002-09-02 16:20               ` Eli Zaretskii
2002-09-04 14:35             ` Juanma Barranquero
2002-09-05  5:08               ` Eli Zaretskii
2002-09-05  6:21                 ` Juanma Barranquero
2002-09-05 11:06                   ` Andreas Schwab
2002-09-05 14:57                   ` Eli Zaretskii [this message]
2002-09-05 17:06                     ` Juanma Barranquero
2002-09-06 10:47                 ` Juanma Barranquero
2002-09-18  6:43                   ` Eli Zaretskii
2002-09-20  8:26                     ` Juanma Barranquero
2002-09-20 21:23                       ` Eli Zaretskii
2002-09-22 17:24                         ` Juanma Barranquero
2002-09-22 13:23                           ` Eli Zaretskii
2002-09-24 16:46                             ` Juanma Barranquero
2002-09-24 18:03                               ` Stefan Monnier
2002-09-25  6:36                                 ` Juanma Barranquero
2002-09-25 14:30                                   ` Stefan Monnier
2002-09-30  7:02                                     ` Juanma Barranquero
2002-10-01  6:18                                       ` Richard Stallman
2002-10-01 14:42                                         ` Juanma Barranquero
2002-09-29  5:43                         ` Juanma Barranquero
2002-09-29 16:38                           ` Eli Zaretskii
2002-09-29 19:53                             ` Stefan Monnier
2002-09-30  2:06                               ` Juanma Barranquero
2002-09-30  1:56                             ` Juanma Barranquero
2002-09-30  4:39                               ` Eli Zaretskii
2002-09-29 18:44                           ` Richard Stallman
2002-10-01  5:58                             ` Juanma Barranquero
2002-10-01 13:38                               ` Richard Stallman
2002-10-04  7:45                                 ` Juanma Barranquero
2002-08-30 19:18   ` Richard Stallman
2002-08-31 23:25     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SUN.3.91.1020905164917.18455B-100000@is \
    --to=eliz@is.elta.co.il \
    --cc=Takaaki.Ota@am.sony.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).