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 2008-04-18, Dave Burns wrote:
> I have a bash script that works on one PC, does not work on another. I
> had thought they were configured the same, apparently not!
> Here's the script, short and sour:
> #!/bin/bash
> #invoke if results are too old
> /usr/bin/find /cygdrive/c/audit.txt -mtime +7 -exec
> /cygdrive/c/audit/  \;
> error message is 'find: missing argument to -exec'. is
> another script, one that executes okay on both PCs when invoked
> directly. Also, if I just type in the command, it works on both PCs.
> I googled the error message and cygwin, seems a lot of people
> encounter this problem with -exec rm {}\;, not putting in the space.
> But this -exec doesn't use {}, has a space in front of \;, and works
> fine on a different machine, exact same script. Maybe different
> versions of find? Some strange enviroment thing? I re-installed cygwin
> from scratch on the one that bombs, no help there.

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


Unsubscribe info:
Problem reports:

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