系统相关
首页 > 系统相关> > shell脚本

shell脚本

作者:互联网

shell脚本

#! /bin/bash
function read_dir(){
for file in `ls $1`
do
 if [ -d $1"/"$file ]
 then
 echo "$file"
 path=$1"/"$file
# projectName=${path#*//}
 projectName=$file
 echo "curl http://localhost:8899/mount?project=$projectName"
# eval "curl http://localhost:8899/mount?project=$projectName"
 echo " " 
 echo "cp -r $path/* /tmp/mnt/$projectName"
# eval "cp -r $path/* /tmp/mnt/$projectName"
 echo " "
 echo "curl http://localhost:8899/flush?project=$projectName"
# eval "curl http://localhost:8899/flush?project=$projectName" 
 echo " "
 fi
done
}
read_dir $1

 

shell

标签:脚本,shell,http,projectName,echo,file,curl,localhost
来源: https://www.cnblogs.com/guoyu1/p/13091945.html