|
From: | Bob Proulx |
Subject: | [bug #20245] bad variable substitution? |
Date: | Sat, 23 Jun 2007 15:52:16 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2~bpo.1) |
Update of bug #20245 (project findutils): Assigned to: None => rwp Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #1: The problem you have experienced is not a bug in find but is due to insufficient evaluation of quoted arguments. This can be seen by using 'sh -x' to invoke your test script. mask="-name '$2'" find $1 $mask -type f -print $ sh -x ./script '*txt' + mask='-name '\''*txt'\''' + find . -name ''\''*txt'\''' -type f -print The find program is receiving the quote characters. In your example the find command needs a shell 'eval' in order to remove one layer of shell quoting. mask="-name '$2'" eval find $1 $mask -type f -print I hope this helps. If it does not resolve your issue then please post again. Thanks. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?20245> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |