unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4406: 23.1; eshell quoting problem with -exec rm {} \;
@ 2009-09-11 18:59 Xah Lee
  2009-09-12  8:30 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Xah Lee @ 2009-09-11 18:59 UTC (permalink / raw)
  To: bug-gnu-emacs

this is probably a bug.

when running eshell in Windows, i do

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

it turns out, one needs to quote the ending semicolon.

This does not work:
find -name "*el" -exec rm {} \\;

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

It appears to me, this seems to be a bug, since
-exec rm {} \;
is a standard idiom in bash, and no reason that shouldn't work.

(Pascal J Bourguignon gave the correct solution. This issue is discussed a 
bit at gnu.emacs.help here
http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/46eb4e95fcbc1fb9? )

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

* bug#4406: 23.1; eshell quoting problem with -exec rm {} \;
  2009-09-11 18:59 bug#4406: 23.1; eshell quoting problem with -exec rm {} \; Xah Lee
@ 2009-09-12  8:30 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2009-09-12  8:30 UTC (permalink / raw)
  To: Xah Lee, 4406

> From: "Xah Lee" <xah@xahlee.org>
> Date: Fri, 11 Sep 2009 11:59:30 -0700
> Cc: 
> 
> c:\Users\xah\web>find -name "*el" -exec rm {} \;
> find -name "*el" -exec rm {} \;
> find: missing argument to `-exec'
> 
> it turns out, one needs to quote the ending semicolon.
> 
> This does not work:
> find -name "*el" -exec rm {} \\;
> 
> This works:
> find -name "*el" -exec rm {} ';'
> 
> It appears to me, this seems to be a bug, since
> -exec rm {} \;
> is a standard idiom in bash, and no reason that shouldn't work.

Eshell is not Bash, and on Windows, it treats the backslash as a
directory separator (unlike Bash).

So I think this is not a bug, just a platform-specific behavior that
needs to be learned.





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

end of thread, other threads:[~2009-09-12  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 18:59 bug#4406: 23.1; eshell quoting problem with -exec rm {} \; Xah Lee
2009-09-12  8:30 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).