unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* eshell: find: missing argument to `-exec' ?
@ 2009-09-11  7:59 Xah Lee
  2009-09-11 12:23 ` Alan Mackenzie
  0 siblings, 1 reply; 9+ messages in thread
From: Xah Lee @ 2009-09-11  7:59 UTC (permalink / raw)
  To: help-gnu-emacs

when running eshell in Windows, i do

c:\Users\xah\web\xxst\make_download_copy>find -name "*el" -exec rm {}
\;
find -name "*el" -exec rm {} \;
find: missing argument to `-exec'

why is it missing argument?

Thanks.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
  2009-09-11  7:59 eshell: find: missing argument to `-exec' ? Xah Lee
@ 2009-09-11 12:23 ` Alan Mackenzie
  2009-09-11 12:43   ` Pascal J. Bourguignon
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Mackenzie @ 2009-09-11 12:23 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, Xah,

Xah Lee <xahlee@gmail.com> wrote:
> when running eshell in Windows, i do

> c:\Users\xah\web\xxst\make_download_copy>find -name "*el" -exec rm {}
> \;
> find -name "*el" -exec rm {} \;
> find: missing argument to `-exec'

> why is it missing argument?

At a guess, you need to quote the {}, like this:

    find -name "*el" -exec rm \{} \;
                              ^

> Thanks.

>  Xah

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
  2009-09-11 12:23 ` Alan Mackenzie
@ 2009-09-11 12:43   ` Pascal J. Bourguignon
  2009-09-11 14:57     ` Eli Zaretskii
       [not found]     ` <mailman.6446.1252681177.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Pascal J. Bourguignon @ 2009-09-11 12:43 UTC (permalink / raw)
  To: help-gnu-emacs

Alan Mackenzie <acm@muc.de> writes:

> Hi, Xah,
>
> Xah Lee <xahlee@gmail.com> wrote:
>> when running eshell in Windows, i do
>
>> c:\Users\xah\web\xxst\make_download_copy>find -name "*el" -exec rm {}
>> \;
>> find -name "*el" -exec rm {} \;
>> find: missing argument to `-exec'
>
>> why is it missing argument?
>
> At a guess, you need to quote the {}, like this:
>
>     find -name "*el" -exec rm \{} \;

find gives this error when it doesn't see the ';' argument.
I know of no shell where {} needs to be escaped or quoted.

eshell seems to have difficulties with backslash escapes on
MS-Windows.  Then we could use quotes instead:

   find -name "*el" -exec rm {} ';'

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
  2009-09-11 12:43   ` Pascal J. Bourguignon
@ 2009-09-11 14:57     ` Eli Zaretskii
       [not found]     ` <mailman.6446.1252681177.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2009-09-11 14:57 UTC (permalink / raw)
  To: help-gnu-emacs

> From: pjb@informatimago.com (Pascal J. Bourguignon)
> Date: Fri, 11 Sep 2009 14:43:53 +0200
> 
> > At a guess, you need to quote the {}, like this:
> >
> >     find -name "*el" -exec rm \{} \;
> 
> find gives this error when it doesn't see the ';' argument.
> I know of no shell where {} needs to be escaped or quoted.
> 
> eshell seems to have difficulties with backslash escapes on
> MS-Windows.  Then we could use quotes instead:
> 
>    find -name "*el" -exec rm {} ';'

The {} needs to be quoted as well.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
       [not found]     ` <mailman.6446.1252681177.2239.help-gnu-emacs@gnu.org>
@ 2009-09-11 18:45       ` Xah Lee
  2009-09-11 18:53         ` Xah Lee
  2009-09-14  9:35       ` Pascal J. Bourguignon
  1 sibling, 1 reply; 9+ messages in thread
From: Xah Lee @ 2009-09-11 18:45 UTC (permalink / raw)
  To: help-gnu-emacs

none of the suggestions seems to work so far.

c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo \
{} \;
find . -name "*sch*" -exce echo \{} \;
find: unknown predicate `-exce'

c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo \
{\} \;
find . -name "*sch*" -exce echo \{\} \;
find: unknown predicate `-exce'

c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo {}
';'
find . -name "*sch*" -exce echo {} ';'
find: unknown predicate `-exce'

c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo
'{}' ';'
find . -name "*sch*" -exce echo '{}' ';'
find: unknown predicate `-exce'

this appears to be a bug?

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
  2009-09-11 18:45       ` Xah Lee
@ 2009-09-11 18:53         ` Xah Lee
  2009-09-12  8:27           ` Eli Zaretskii
       [not found]           ` <mailman.6507.1252744061.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Xah Lee @ 2009-09-11 18:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 11, 11:45 am, Xah Lee <xah...@gmail.com> wrote:
> none of the suggestions seems to work so far.
>
> c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo \
> {} \;
> find . -name "*sch*" -exce echo \{} \;
> find: unknown predicate `-exce'
>
> c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo \
> {\} \;
> find . -name "*sch*" -exce echo \{\} \;
> find: unknown predicate `-exce'
>
> c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo {}
> ';'
> find . -name "*sch*" -exce echo {} ';'
> find: unknown predicate `-exce'
>
> c:\Users\xah\Documents\vrici\cabdei>find . -name "*sch*" -exce echo
> '{}' ';'
> find . -name "*sch*" -exce echo '{}' ';'
> find: unknown predicate `-exce'
>
> this appears to be a bug?

Sorry, i had big typo in the above. This works:

find . -name "*sch*" -exec echo {} ';'

Thanks. Still, this probably should probably be considered a bug. Is
there some technical reason eshell having problems with the \; ?

 Xah


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
  2009-09-11 18:53         ` Xah Lee
@ 2009-09-12  8:27           ` Eli Zaretskii
       [not found]           ` <mailman.6507.1252744061.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2009-09-12  8:27 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Xah Lee <xahlee@gmail.com>
> Date: Fri, 11 Sep 2009 11:53:15 -0700 (PDT)
> 
> Sorry, i had big typo in the above. This works:
> 
> find . -name "*sch*" -exec echo {} ';'
> 
> Thanks. Still, this probably should probably be considered a bug. Is
> there some technical reason eshell having problems with the \; ?

Yes, there is: you cannot have \ be an escape character on Windows
(without some major annoyances), because it serves as a directory
separator.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
       [not found]           ` <mailman.6507.1252744061.2239.help-gnu-emacs@gnu.org>
@ 2009-09-12 17:10             ` Xah Lee
  0 siblings, 0 replies; 9+ messages in thread
From: Xah Lee @ 2009-09-12 17:10 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 12, 1:27 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Xah Lee <xah...@gmail.com>
> > Date: Fri, 11 Sep 2009 11:53:15 -0700 (PDT)
>
> > Sorry, i had big typo in the above. This works:
>
> > find . -name "*sch*" -exec echo {} ';'
>
> > Thanks. Still, this probably should probably be considered a bug. Is
> > there some technical reason eshell having problems with the \; ?
>
> Yes, there is: you cannot have \ be an escape character on Windows
> (without some major annoyances), because it serves as a directory
> separator.

I see. thanks.

 Xah


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: eshell: find: missing argument to `-exec' ?
       [not found]     ` <mailman.6446.1252681177.2239.help-gnu-emacs@gnu.org>
  2009-09-11 18:45       ` Xah Lee
@ 2009-09-14  9:35       ` Pascal J. Bourguignon
  1 sibling, 0 replies; 9+ messages in thread
From: Pascal J. Bourguignon @ 2009-09-14  9:35 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: pjb@informatimago.com (Pascal J. Bourguignon)
>> Date: Fri, 11 Sep 2009 14:43:53 +0200
>> 
>> > At a guess, you need to quote the {}, like this:
>> >
>> >     find -name "*el" -exec rm \{} \;
>> 
>> find gives this error when it doesn't see the ';' argument.
>> I know of no shell where {} needs to be escaped or quoted.
>> 
>> eshell seems to have difficulties with backslash escapes on
>> MS-Windows.  Then we could use quotes instead:
>> 
>>    find -name "*el" -exec rm {} ';'
>
> The {} needs to be quoted as well.

Not with bash in eshell on unix.  Perhaps it's needed specifically on MS-Windows?

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-14  9:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-11  7:59 eshell: find: missing argument to `-exec' ? Xah Lee
2009-09-11 12:23 ` Alan Mackenzie
2009-09-11 12:43   ` Pascal J. Bourguignon
2009-09-11 14:57     ` Eli Zaretskii
     [not found]     ` <mailman.6446.1252681177.2239.help-gnu-emacs@gnu.org>
2009-09-11 18:45       ` Xah Lee
2009-09-11 18:53         ` Xah Lee
2009-09-12  8:27           ` Eli Zaretskii
     [not found]           ` <mailman.6507.1252744061.2239.help-gnu-emacs@gnu.org>
2009-09-12 17:10             ` Xah Lee
2009-09-14  9:35       ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).