0
在bash腳本中,語句的括號引用表達式在]
的右邊沒有分號,根據的編程使用外殼腳本這個book。在bash腳本的if表達式結尾是否有分號可選?
但分號可以在許多不同的教程或腳本,如本tutorial和這個腳本片段中可以看出:
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
我什麼時候必須把分號呢?