This is the mail archive of the cygwin 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: bash script works on one PC, bombs on another?

On Fri, Apr 18, 2008 at 6:42 PM, Brian Dessent <> wrote:
> Dave Burns wrote:
>  > #!/bin/bash
>  > #invoke if results are too old
>  > /usr/bin/find /cygdrive/c/audit.txt -mtime +7 -exec
>  > /cygdrive/c/audit/  \;
>  Is the file really wrapped like that or is it all one line?

One line, wrap is result of emailing somehow.

>  > Maybe different versions of find?
>  Um, that's kind of the sort of thing you're supposed to tell us, such as
>  by attaching 'cygcheck -srv' output or at least the output of 'find
>  --version'.

Okay, I'm being a  bit lazy. Since I installed these two cygwins
within a couple of weeks of each other, and find is not under intense
development, I thought this was pretty low probability, but I
should've eliminated it.

>  > Some strange enviroment thing? I re-installed cygwin
>  > from scratch on the one that bombs, no help there.
>  Perhaps you have DOS line endings in one file and not the other, and
>  find is seeing ";\r" which it treats as an argument to pass to the
>  exec'd process and not the list terminator.

I considered that, and edited the file using vim, and retyped that
line. Is that enough to eliminate that possibility? What is a more
straight-forward test of this possibility?

Gary Johnson wrote:
>The script on the machine that bombs appears to have CRLF line
>endings.  Run d2u on the script and it should work fine.

Ah! Thanks, I'll try that.


Unsubscribe info:
Problem reports:

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