delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/18/22:49:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <943be0b10804181948t509e7a6cg189229e568ba03fc@mail.gmail.com>
Date: Fri, 18 Apr 2008 16:48:43 -1000
From: "Dave Burns" <tburns AT hawaii DOT edu>
To: cygwin AT cygwin DOT com
Subject: bash script works on one PC, bombs on another?
MIME-Version: 1.0
X-Google-Sender-Auth: f6cee603e034f9c4
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

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 audit.sh if results are too old
/usr/bin/find /cygdrive/c/audit.txt -mtime +7 -exec
/cygdrive/c/audit/audit.sh  \;

error message is 'find: missing argument to -exec'. audit.sh 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.

Thanks in advance,
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