linux
菜鸟前进路
梦的开始与结束
展开
-
简单的gdb调试:
gdb简单调试步骤: 新建一个小demoC程序: int func(int n) { int sum=0,i; for(i=0; i<n; i++) { sum+=i; } return sum; } main() { int i; long result = 0; ...原创 2018-09-26 16:19:35 · 240 阅读 · 0 评论 -
shell脚本 监控进程 10秒不在就重启
#!/bin/sh while true do ps -ef|grep "test"|grep -v "grep" if["$?"-eq 1] then nohup ./test & echo "process has been restarted!" else echo "process already started!" fi sleep 10 done原创 2019-04-12 15:03:17 · 592 阅读 · 0 评论