On Wed, 4 Sep 2002, Bob Buckley wrote:

> Messagetry this
> 
> mv *.inc *.php.

assuming that you'd like to rename each .inc file to the corresponding
.php name, there's a handy utility called "basename", which takes an
optional third argument as the suffix to strip from a filename.

so, change to the directory in question, and

$ for FILE in *.inc ; do
> BASE=$(basename $FILE .inc)
> mv $BASE.inc $BASE.php
> echo "just copied to $BASE.php"
> done
$

it doesn't get a lot easier than that.

rday



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to