OK, I am repeating my solution here: try this: #! /bin/ bash for text in *$1*.php; do mv $text $text.old ...
www.experts-exchange.com