공부
[Sh] command $? exit() & timer <= 30s failed
승가비
2021. 1. 21. 20:25
728x90
s=$(date +%s)
# cmd ...
result=$?
e=$(date +%s)
diff=`expr ${e} - ${s}`
if [ ${diff} -lt 30 ]; then
exit 1
fi
exit $result
유닉스,리눅스에서 $? 의 의미, 활용
https://coupa.ng/bLlrXA 이것이 리눅스다:with RedHat ...
blog.naver.com
728x90