029_shell编写工作常用工具类总结
2018-10-08 15:09
351 查看
一、检查命令的执行结果
function check_result() { result=$? flag=$1 if [[ "$result"x == "0"x ]];then echo "###############$flag is OK.###############" else echo "###############$flag is Failed.###########" exit -1 fi }
调用
check_result "cat conf/channel.conf > flume-agent.properties"
相关文章推荐
- 在工作中第一次编写遇到的shell问题总结
- 同一个项目的不同的项目工作经验总结--设计文档编写经验总结
- shell工作应用总结
- shell命令工作总结
- 同一个项目的不同的项目工作经验总结--设计文档编写经验总结
- shell笔记-全面总结-强化脚本编写能力
- Shell脚本简单总结及编写脚本中的小技巧
- 工作中编写shell脚本设计到相关信息
- shell编写总结
- 同一个项目的不同的项目工作经验总结--设计文档编写经验总结
- shell脚本编写小例子——工作笔记
- Shell脚本简单总结及编写脚本中的小技巧
- 同一个项目的不同的项目工作经验总结--设计文档编写经验总结
- 总结:工作中用到的SHELL脚本、shell语句
- shell从入门到工作中常用命令总结
- shell脚本编写总结
- 【APP】Shell脚本简单总结及编写脚本中的小技巧 推荐
- python shell GUI编写切换工作路径
- 编写shell脚本的一点经验总结
- 同一个项目的不同的项目工作经验总结--设计文档编写经验总结