天天看點

set -ex是什麼意思?

通常bash腳本的開頭都會有這樣的代碼:

#!/bin/bash
set -ex      

​set -e​

​的意思就是當腳本中的任何一行執行失敗就退出。

+ rm -f pg_all.sql pg_all.sql.gz