delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/14/15:29:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: "Javier" <fjpp AT softhome DOT net>
Subject: Re: "find -exec broken"??
Date: Sat, 14 Dec 2002 21:30:01 +0100
Lines: 129
Message-ID: <atg4ab$k8c$1@main.gmane.org>
References: <20021214055215 DOT 0D97A4993 AT sitemail DOT everyone DOT net>
NNTP-Posting-Host: 213-4-19-147.uc.nombres.ttd.es
X-Trace: main.gmane.org 1039897739 20748 213.4.19.147 (14 Dec 2002 20:28:59 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Sat, 14 Dec 2002 20:28:59 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Duh!!

I was just missign the "\" befor the ";", so it didn't work. The docs
(man find) _do_ say something about the (pssible) need to escape the {}
for the command to run, but it isn't so clear about the ";" - of course
thinking a little about it, I guess the shell was taking the ; as a
command separator, and executing both commands, "find" and "null"...
that's the reason for the unhelpful :

public_html> find . -type d -maxdepth 1 -exec echo {} ;
find: missing argument to `-exec'

it was missing the ending ;

en> find . -type d -maxdepth 1 -exec echo {} ;
find: missing argument to `-exec'

but anything after the ; was executed:

en> find . -type d -maxdepth 1 -exec echo {} ; ls
find: missing argument to `-exec'
SCCS/  index.en.html*  to_do.en.html*

and once I escaped the ";", all went well:

en> find . -type d -maxdepth 1 -exec echo {} \;

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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