#!/bin/bash# Needs bash 4 or later,for `;&` to work[ "" = "--frest_start" ] && rm statusfiletouch statusfileread status < statusfile[ "$status" = "" ] && status=0case $status in0) ./script1; echo 1 > statusfile ;&1) ./script2; echo 2 > statusfile ;&2) ./script3; echo 3 > statusfile ;&# ....... & so on till23) ./script24; echo 24 > statusfile ;;esac
但通过Makefile做这件事似乎也是一个很好的解决方案……
.NOTParaLLEL.PHONY: all frest_startall: make step1 make step2 make step3 .... make step24step%: script% "./$<" touch "$@"frest_start: rm steP* make all总结
以上是内存溢出为你收集整理的linux – bash脚本从上次失败的地方执行全部内容,希望文章能够帮你解决linux – bash脚本从上次失败的地方执行所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)