Re: stupid script tricks - slightly OT
On Mon, Apr 29, 2002 at 12:05:11PM -0400, jeff wrote:
| Allan Wind wrote:
| > cd /usr/local/share/icons; find / \( -name \*.gif -o name \*.jpeg -o
| -name \*.jpg -o -name \*.tif -o -name \*.tiff \) -a -type f | xargs -i
| ln -s \{\} .
|
| this looks like it should indeed work...but when i
| try it, i get:
|
| find: paths must precede expression
| Usage: find [path...] [expression]
That error usually means that you've missed quoting a metacharacter in the
find command... e.g.
$ dir
afile anotherfile
$ find . -name a* -print
find: paths must precede expression
Usage: find [path...] [expression]
Because what the shell executed as the command, after expanding the
wildcards, was
$ find . -name afile anotherfile -print
and 'anotherfile' only made sense to find as a '[path...]' since it didn't fit
as part of the '[expression]'. The fix, in this case, is obviously to put
"s around the pattern. Your case is a bit more complicated, but almost
certainly has the same problem: one of the wildcards is being expanded by
the shell instead of being passed to find. You just need to find it, and
quote it.
--
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: