Bash wizards: I have run across another quandary. I am trying to get a filespec from the command line like: ./scriptname file1* and file name expansion occurs before I can assign the filespec to a variable. I want to be able to grab the 'file1*' filespec without having to require that it be enclosed in single quotes (./scriptname 'file1*'). I'm using the filespec like: FILESPEC=$1 NEWNAME=$2 for i in $(ls ${FILESPEC}); do echo -n "moving $i --> ${NEWNAME}.${i##*.}" if mv $i ${NEWNAME}.${i##*.}; then echo ".........Success" else echo ".........Failed" fi done Can I do it, or do I have to look at handling the expanded command line in another way like an array or something? The easiest way would probably be to swap NEWNAME to $1 and then do $2 until I run out of parameters, but that would defeat my preference of the command line being ./rename what to-what. What is the best way to skin this cat? (I've also learned that the expression can be 'wash that pig' in some parts as well) Thanks. -- David C. Rankin, J.D.,P.E. | openSoftware und SystemEntwicklung Rankin Law Firm, PLLC | Countdown for openSuSE 11.1 www.rankinlawfirm.com | http://counter.opensuse.org/11.1/small -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org