check

来自「linux下的一个分组遗传算法」· 代码 · 共 27 行

TXT
27
字号
#!/bin/tcsh## This script checks if a program gga is running, if so, it checks for a # rescue file. For an added check it looks if the word Tot can be found# int the stats file, this would mean the program was already finished.# If all these are true the program is restarted.## TODO# * Remove the crontab entry when the program is finished.#   doesn't work right now.## Author: J.I.v.Hemert#setenv PATH ".:$PATH"if ("x`ps -u jvhemert | grep gga`" == 'x') then	if (-f project/results/rescue-$1) then		if ("x`grep Tot project/results/stats-$1`" == 'x') then			cd project/bin			(nohup ./gga ../configs/config-$1.gga >&! ../results/errors-$1 & ) >& /dev/null			renice %2 15 >& /dev/null		else			crontab -r >& /dev/null		endif	endifendif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?