This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: echo and CYGWIN variable

Hash: SHA1

On Wed, 21 May 2003 10:39:43 -0400 (EDT), Igor Pechtchanski <> 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 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  FAX:  1-815-5509341  / \                  Better  Safe  Than  Sorry
Comment: use to get my key (and others)


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]