bash script works on one PC, bombs on another?

Brian Dessent brian@dessent.net
Sat Apr 19 05:53:00 GMT 2008


Dave Burns wrote:

> #!/bin/bash
> #invoke audit.sh if results are too old
> /usr/bin/find /cygdrive/c/audit.txt -mtime +7 -exec
> /cygdrive/c/audit/audit.sh  \;

Is the file really wrapped like that or is it all one line?

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

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

Brian

--
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/



More information about the Cygwin mailing list