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

Re: Potato orphans



>>>> joey@kite:~>dpkg -S '/usr/bin/\['

>>> I'd be inclined to call that a dpkg bug--it's not exactly intuitive
>>> syntax.

>> It's not a dpkg issue, it's a shell issue.  '[' is a shell
>> metacharacter, and must therefore be esacaped when passed in an
>> argument to *any* program, not just dpkg.
 
> Note that it's escaped *twice* above...

One of the escapes is to get it past the shell metacharacter expansion,
the second is to tell dpkg that it's not a metacharacter - from 'man
dpkg':

      dpkg -S | --search filename-search-pattern ...
              Search  for a filename from installed packages. All
              standard shell wildchars can be used in the pattern.

Being able to use a pattern here, as opposed to a fixed string, is a
powerful feature of dpkg, and not one I'd like to see removed to cope
with the (possibly unique) case of /usr/bin/[ - "optimize for the common
case" and all that.

I thought you were referring to the required escape for the shell.

          Colm

-- 
Colm Buckley BA BF | NewWorld Commerce, 44 Westland Row, Dublin 2, Ireland
colm@tuatha.org (personal) | colm.buckley@nwcgroup.com (business)
+353 87 2469146 | whois cb3765 | http://www.tuatha.org/~colm/
Windows can be installed by an idiot, and usually is.


--  
To UNSUBSCRIBE, email to debian-testing-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: