shell
来源:互联网 发布:ubuntu root登录密码 编辑:程序博客网 时间:2024/06/05 04:00
shell ‘$’ 总结
- $#传递到脚本的参数个数
- $$脚本当前进程号
- $0当前脚本名
1, 2,$3传递参数1,2,3
shell调用命令,并赋值给参数
#/bin/basha=`ps -ef | grep tomcat | wc -l `ehco $a
由于爬虫服务器,总是挂,需要实现一个ruby监控脚本,监控当前爬虫线程工作数量,如果不对,则重启。
ifconfig_bin=`which ifconfig`ip=`${ifconfig_bin} eth0 | grep 'inet addr' | awk ${print $2}` | awk -F ':' '{print $2}'num=`ps -ef | grep ruby | grep -v 'grep' | wc -l`unless num < 3 /data/bin/startup.sh restartendsend_message(ip)
阅读全文
0 0
- shell
- shell
- shell
- shell
- shell
- Shell
- shell
- Shell
- shell
- shell
- SHELL
- Shell
- shell
- shell
- shell
- shell
- shell
- shell
- WPF绑定相关
- yii2框架-restful的请求参数token验证
- Python 程序的运行原理
- Serpent.AI
- inodes占用100%问题
- shell
- webpacak将ES6转ES5
- Yii2 数据库Active Record(ORM)
- Implementing a Simple Calculator Using Antlr
- 从零学习嵌入式
- PHP 函数定义
- 北京赛区(2017)网络赛 之 Minimum(线段树)
- Ajax -- 发送 GET 请求
- 【codevs 2273】扬帆远洋大战牧师妹酱