티스토리 뷰
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
'공부' 카테고리의 다른 글
[License] MIT (0) | 2021.01.21 |
---|---|
[Python] add date, week, month (0) | 2021.01.21 |
[Sh] command $? exit() & timer <= 30s failed (0) | 2021.01.21 |
[Sh] exit() (0) | 2021.01.21 |
[Python] weekday(); week of day (feat. date_to_string & string_to_date) (0) | 2021.01.21 |
[Python] String to Date; Date to String (0) | 2021.01.19 |
댓글