delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/19/21:38:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <943be0b10804191330y485bdcfflcbbf7688ccfaf2f7@mail.gmail.com>
Date: Sat, 19 Apr 2008 10:30:42 -1000
From: "Dave Burns" <tburns AT hawaii DOT edu>
To: cygwin AT cygwin DOT com
Subject: Re: bash script works on one PC, bombs on another?
In-Reply-To: <48097839.F9B4831@dessent.net>
MIME-Version: 1.0
References: <943be0b10804181948t509e7a6cg189229e568ba03fc AT mail DOT gmail DOT com> <48097839 DOT F9B4831 AT dessent DOT net>
X-Google-Sender-Auth: 39a11f06673362f6
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, Apr 18, 2008 at 6:42 PM, Brian Dessent <brian AT dessent DOT net> wrote:
> 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?

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.

Dave

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019