shell 脚本摘录
2018-02-24 00:00
281 查看
windows git-bash复制目录并排除文件夹
cp -rf $(find . -regextype posix-egrep -maxdepth 1 ! -regex './(test-output|target|\.git|\.idea)($|/.*) ') | grep /) ${TARGET_DIR}
SVN 目录刷新,删除不存在的,添加新增的
#刷新SVN变更 function svnFlash(){ ADD_NEW_FILE=$1 DELETE_NOT_EXIXTS_FILE=$2 svn info svn status if [ ${ADD_NEW_FILE} -ne 0 ] ; then echo "add new files" svn st | awk '{if ($1 == "?") {print $2} }' | sed 's/\\/\//g' | xargs svn add fi if [ ${DELETE_NOT_EXIXTS_FILE} -ne 0 ] ; then echo "delete not exist files" svn st | awk '{if ($1 == "!") {print $2} }' | sed 's/\\/\//g' | xargs svn delete fi svn status } svnFlash 1 1
远程登录执行脚本
ssh ${USERNAME}@10.0.0.1 >${TMP_OUT} 2>&1 << eeooff <some cmd> exit eeooff
相关文章推荐
- Shell脚本传递带有空格的参数[摘录自网络]
- 【摘录】shell脚本条件语句
- Shell脚本语法-摘录
- Shell脚本的编写(摘录)
- shell脚本笔记
- gitlab webhook php exec 调用 shell 脚本。shell 脚本中调用 git pull 命令无法执行。
- shell脚本工具之awk命令
- linux执行shell脚本
- Shell脚本实现自动修改IP、主机名等功能分享
- Shell中实现类似于结构体/数组功能的脚本
- lnmp环境一键配置网站shell脚本
- 设置shell脚本开始执行时间以及结束时间
- Shell 脚本基础学习 (四)
- Shell 脚本知识回顾 (一) —— 基础篇
- 生产环境中安装vsftpd的shell脚本
- Shell脚本编程之Bash特性-IO重定向-变量
- shell脚本监测DNS链接状态给传给zabbix值
- Shell向Perl脚本中传递变量的方法
- Shell脚本调试技术