public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: problem with batch files.
@ 1998-01-19 15:26 Earnie Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Earnie Boyd @ 1998-01-19 15:26 UTC (permalink / raw)
  To: olc; +Cc: gnu-win32

1) Mount you directories as text=binary.
2) Remove the \r from the line terminator in your batch file.


-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/           (ftp site)
http://www.cygnus.com/pubs/gnupro/                   (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                (Project Page)
http://www.cygnus.com/ml/gnu-win32                   (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/    (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html        (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports)
http://www.bestweb.net/~aka/gnu-win32/  (GNU-Win32 Bash Configuration)


>Date: Wed, 14 Jan 1998 14:21:43 +0100
>From: Olivier Cuisenaire <olc@tele.ucl.ac.be>
>To: "gnu-win32@cygnus.com" <gnu-win32@cygnus.com>
>Subject: problem with batch files.
>
>When I try to this very simple file (named coco):
>
>#!/bin/sh
>#
>ls
>echo hello
>
>I receive, after the result of the ls command, the following error:
>
>coco: o: command not found
>
>The problem being that it seems to delete the first three characters of 
the
>last line leaving only "o hello". This diagnosis is confirmed by the 
fact
>inserting any three characters at the beginning of this line will solve 
the
>problem, while inserting one or two characters give the errors "ho: 
command
>not found" and "cho: command not found" respectively.
>
>This is very discturbing when using more complex batch files (I 
actually
>would like to use the configure file to install lesstif)
>
>Is this a known bug for which a patch exists ? (I'm currently using
>sh-2.01, sergey's patch)
>
>Thanks.
>
>Olivier
>
>-- Olivier Cuisenaire, Ph. D. student --
>
>     " Whenever you find yourself on the side of the 
>       majority, it is time to pause and reflect. "
>
>                                   Mark Twain
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with batch files.
  1998-01-13 12:59 Olivier Cuisenaire
@ 1998-01-18  7:24 ` Michael Hirmke
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Hirmke @ 1998-01-18  7:24 UTC (permalink / raw)
  To: gnu-win32

Hi Olivier,

>When I try to this very simple file (named coco):
>
>#!/bin/sh
>#
>ls
>echo hello
>
>I receive, after the result of the ls command, the following error:
>
>coco: o: command not found

You have to remount your partitions in binary mode and change your scripts
from DOS to Unix style line breaks.

[...]
>Thanks.
>
>Olivier

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* problem with batch files.
@ 1998-01-15 15:16 Olivier Cuisenaire
  0 siblings, 0 replies; 5+ messages in thread
From: Olivier Cuisenaire @ 1998-01-15 15:16 UTC (permalink / raw)
  To: gnu-win32

When I try to this very simple file (named coco):

#!/bin/sh
#
ls
echo hello

I receive, after the result of the ls command, the following error:

coco: o: command not found

The problem being that it seems to delete the first three characters of the
last line leaving only "o hello". This diagnosis is confirmed by the fact
inserting any three characters at the beginning of this line will solve the
problem, while inserting one or two characters give the errors "ho: command
not found" and "cho: command not found" respectively.

This is very discturbing when using more complex batch files (I actually
would like to use the configure file to install lesstif)

Is this a known bug for which a patch exists ? (I'm currently using
sh-2.01, sergey's patch)

Thanks.

Olivier

-- Olivier Cuisenaire, Ph. D. student --

     " Whenever you find yourself on the side of the 
       majority, it is time to pause and reflect. "

                                   Mark Twain
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with batch files.
@ 1998-01-15  7:26 Earnie Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Earnie Boyd @ 1998-01-15  7:26 UTC (permalink / raw)
  To: olc; +Cc: gnu-win32

Make certain that your file doesn't contain the \r\n combination.  It 
should only contain the \n combination.  Also, your mounts need to be 
text=binary.  Look at the mail archives for all kinds of banter on this 
subject.

>Date: Tue, 13 Jan 1998 21:58:22 +0100
>From: Olivier Cuisenaire <olc@tele.ucl.ac.be>
>To: "gnu-win32@cygnus.com" <gnu-win32@cygnus.com>
>Subject: problem with batch files.
>
>When I try to this very simple file (named coco):
>
>#!/bin/sh
>#
>ls
>echo hello
>
>I receive, after the result of the ls command, the following error:
>
>coco: o: command not found
>
>The problem being that it seems to delete the first three characters of 
the
>last line leaving only "o hello". This diagnosis is confirmed by the 
fact
>inserting any three characters at the beginning of this line will solve 
the
>problem, while inserting one or two characters give the errors "ho: 
command
>not found" and "cho: command not found" respectively.
>
>This is very discturbing when using more complex batch files (I 
actually
>would like to use the configure file to install lesstif)
>
>Is this a known bug for which a patch exists ? (I'm currently using
>sh-2.01, sergey's patch)
>
>Thanks.
>
>Olivier
>
>-- Olivier Cuisenaire, Ph. D. student --
>
>     " Whenever you find yourself on the side of the 
>       majority, it is time to pause and reflect. "
>
>                                   Mark Twain
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>


-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/           (ftp site)
http://www.cygnus.com/pubs/gnupro/                   (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                (Project Page)
http://www.cygnus.com/ml/gnu-win32                   (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/    (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html        (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports)


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* problem with batch files.
@ 1998-01-13 12:59 Olivier Cuisenaire
  1998-01-18  7:24 ` Michael Hirmke
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Cuisenaire @ 1998-01-13 12:59 UTC (permalink / raw)
  To: gnu-win32

When I try to this very simple file (named coco):

#!/bin/sh
#
ls
echo hello

I receive, after the result of the ls command, the following error:

coco: o: command not found

The problem being that it seems to delete the first three characters of the
last line leaving only "o hello". This diagnosis is confirmed by the fact
inserting any three characters at the beginning of this line will solve the
problem, while inserting one or two characters give the errors "ho: command
not found" and "cho: command not found" respectively.

This is very discturbing when using more complex batch files (I actually
would like to use the configure file to install lesstif)

Is this a known bug for which a patch exists ? (I'm currently using
sh-2.01, sergey's patch)

Thanks.

Olivier

-- Olivier Cuisenaire, Ph. D. student --

     " Whenever you find yourself on the side of the 
       majority, it is time to pause and reflect. "

                                   Mark Twain
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-01-19 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-19 15:26 problem with batch files Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1998-01-15 15:16 Olivier Cuisenaire
1998-01-15  7:26 Earnie Boyd
1998-01-13 12:59 Olivier Cuisenaire
1998-01-18  7:24 ` Michael Hirmke

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).