Colin Watson said: > On Tue, Dec 10, 2002 at 11:20:31AM -0800, Osamu Aoki wrote: >> if [ -e *.JPG ]; then for i in *.JPG; do mv "$i" "${i%.JPG}.jpg"; >> done fi > > That -e test looks dreadful ... surely it'll usually expand to lots of > arguments which will confuse [, or perhaps to an empty string > (nullglob) > which will also confuse test? > > -- > Colin Watson > [[EMAIL PROTECTED]]
And I've bumped into this. How *DOES* one test for the existence of ANY file with a given extension without getting a "too many arguments" error when there are multiple files? I want "TRUE" if there is one or more zzz.jpg files in a directory, "FALSE" if there are zero of them. G -- Gerald http://www.phorce1.com http://www.buskatiers.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]