完美脚本1
#!/bin/sh
for i in `find ./ -type f -name "*.c"`; do
dir=`dirname $i`
echo `basename $i` | sed 's/.c$/.C/' | (read file && mv $i $dir"/"$file)
done
完美脚本2
#!/bin/sh
for i in `find ./ -type f -name "*.c"`; do
dir=`dirname $i`
tmp1=`basename $i`
file=`echo $tmp1 | sed 's/.c$/.C/'`
mv $i $dir"/"$file
done
完美脚本3
#!/bin/sh
for i in `find ./ -type f -name "*.c"`; do
dir=`dirname $i`
file=`echo \`basename $i\` | sed 's/.c$/.C/'`
mv $i $dir"/"$file
done