#!/bin/bash
str="scm_image"
function mvfile(){
for file in `ls $1`
do
if [ -d $1"/"$file ]
then
if [ $file != $str ]
then
len=${#str}
substr=${file:$len}
echo $substr
mv $file ./scm_image/$substr
fi
fi
done
}
runPath=$(cd `dirname $0`;pwd)
mvfile $runPath
遍历当前路径下目录并移动shell脚本
最新推荐文章于 2024-07-21 10:22:40 发布