티스토리 뷰

공부

[sh] exit code

승가비 2023. 6. 20. 21:01
728x90
output=$(...)
status=$?
[[ $status == 1 ]] && exit 1

https://www.cyberciti.biz/faq/bash-get-exit-code-of-command/

 

728x90

'공부' 카테고리의 다른 글

[python] empty dict if  (0) 2023.06.20
[datadog] custom metric  (0) 2023.06.20
[Airflow] render_template_as_native_obj=True (xcom.pull native obj; only str)  (0) 2023.06.17
[emr] RunJobFlow json  (0) 2023.06.17
[sh] sed -i -E "s/old_regexp/new/g" file  (0) 2023.06.17
댓글