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/
☄
Xah Lee <xah...@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).
> Hi, Xah,
>
> Xah Lee <xah...@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__
The {} needs to be quoted as well.
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/
☄
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
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
Not with bash in eshell on unix. Perhaps it's needed specifically on MS-Windows?
--
__Pascal Bourguignon__