遍历指定目录下所有文件和目录的shell

时间:2020-07-10 19:19:50   收藏:0   阅读:301
cd $delivery_dir
for file in `ls $delivery_dir`
do
if [ -d $delivery_dir"/"$file ]; then
  cd $delivery_dir"/"$file
  git pull
  cd $server_tools_dir"projectdeploy/runtime/libs"
  echo "开始更新=="$delivery_dir"/"$file
  dotnet Inspur.Gsp.Lcm.Metadata.Deployer.dll $delivery_dir"/"$file"/publish" $server_dir $db_ip $db_port $db_service_name $db_username $db_password $db_type 1 java
  cd $server_tools_dir"dataimport/runtime/libs"
  dotnet DataImportConsole.dll $delivery_dir"/"$file"/data" $db_ip $db_port $db_service_name $db_username $db_password $db_type
  echo "结束更新=="$delivery_dir"/"$file 
fi
done

 

原文:https://www.cnblogs.com/zhuzhaoli/p/13280145.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!