bash 2.05b.1(1) on RHEL3.
I have a script that builds a search expression for find and then runs
find. For some reason, an expression which includes "*" gets quoted
with single quotes and therefore literally looks for 'foo.*' instead
of all foo.*.
FINDRX_C="-name core.\* -o -name core"
FINDRX="${FINDRX_C}${FINDRX_N}${FINDRX_X}"
...
find ${d} -type d -name .snapshot -prune -o -type f \( $FINDRX \)`
...
becomes
sh -x ...
...
+ FINDRX=-name core.\* -o -name core
++ find /home -type d -name .snapshot -prune -o -type f '(' -name 'core.\*' -o -name core ')'
I tried all sorts of quoting tricks, but can't get rid of the single quotes
surrounding core.\*. Any ideas?
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!