delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/21/14:02:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 21 May 2003 20:58:33 +0300
Message-Id: <200305211758.h4LHwX7t008885@beta.mvs.co.il>
From: "Ehud Karni" <ehud AT unix DOT mvs DOT co DOT il>
To: cygwin AT cygwin DOT com
Cc: Rolf DOT Guigas AT t-online DOT de
Subject: Re: echo and CYGWIN variable
In-reply-to: <Pine.GSO.4.44.0305211034250.26639-100000@slinky.cs.nyu.edu>
(message from Igor Pechtchanski on Wed, 21 May 2003 10:39:43 -0400
(EDT))
Organization: Mivtach-Simon Insurance agencies
Reply-to: ehud AT unix DOT mvs DOT co DOT il
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0305211034250 DOT 26639-100000 AT slinky DOT cs DOT nyu DOT edu>
MIME-Version: 1.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 21 May 2003 10:39:43 -0400 (EDT), Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu> wrote:
> 
> Whenever you redirect to a file, the mount table is consulted, and the
> appropriate mode is selected (i.e., CYGWIN has no effect).  If you use
> Win32 paths, there are no entries in the mount table, so I'm not quite
> sure what's going on.  You could try using backslashes instead of forward
> slashes (I think those force textmode), i.e., use ">> 'd:\tmp\file.log'"
> instead of ">> 'd:/tmp/file.log'".  Other things to try would be /bin/echo
> or "echo something | cat >> 'd:/tmp/file.log'" and see if that works.  If
> all else fails, try running "strace" on the echo command (you'll need to
> trace the redirection as well, so you might be better off using "strace
> bash -c 'echo something >> d:/tmp/file.log'"), and see if it provides any
> clues.

Another option is to write a "filter" that has 2 args: the 1st is the
mode (-b/-t) and the second is the file name to write to. This will
bypass the automatic mode setting (I have such a program for code
conversion, e.g. ASCII <---> EBCDIC, and it also does End of Line
conversion, so I can convert from/to CR-LF files on UNIX).

Ehud.


- -- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:ehud AT unix DOT mvs DOT co DOT il                  Better  Safe  Than  Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE+y75ILFvTvpjqOY0RAmKIAJ4htAvfbQQ4txXlf7hawPhWTLULTgCfVcek
xF5CGHmToe6krQ34ruYwXMs=
=3Gje
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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