[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find . -wholename ’./src/emacs’ -prune -o -print

From: Eric Blake
Subject: Re: find . -wholename ’./src/emacs’ -prune -o -print
Date: Wed, 24 Feb 2010 22:10:09 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

According to Reza Roboubi on 2/24/2010 9:47 PM:
> The man page seems buggy:
> find . -wholename ’./src/emacs’ -prune -o -print
> It works _without_ the ticks(quotes) contrary to what the man page says.

There's a difference between "’" which you copied from the man page (a
nice Unicode stylized right single quote) and "'" which is what you get
when you type an apostrophe on your keyboard.  Most likely, the problems
you are seeing are due to pasting the wrong character.

Meanwhile, you may want to study up on shell quoting.  The following are
identical (that is, find sees the same arguments for all four versions):

find . -wholename ./src/emacs -prune -o -print
find . -wholename './src/emacs' -prune -o -print
find . -wholename "./src/emacs" -prune -o -print
find . -wholename \./src/emacs -prune -o -print

Likewise, these three are identical:

find . -name \*.txt
find . -name '*.txt'
find . -name "*.txt"

But this fourth is different (the shell expands the glob first, so what
find sees as arguments depends on what was in the current directory):

find . -name *.txt

At any rate, the only possible bug in your report is whether find is using
the proper groff escape sequences to represent ' in the man pages without
confusing between ASCII and stylized Unicode single quotes.

Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]