Jump to...
redirecting...

Log for Ubuntu 台灣社群

[photo](media:AgADBQADjagxG3fjaFRjh1jS74riUth-3zIABF8mnoHASFf7_84CAAEC@telegram)
CCoC 2.
多媒體在deb 、Arch 系比較方便
你做了什麼?
在這裡散播Arch神教都不會被ban(#
(#
[photo](media:AgADBQADR6gxG3fjcFSj1HNFI0dNq3hs3jIABHPnI71-EvZiX2MDAAEC@telegram)
Raspberry 群嗎?
Arduino沒作業系統 沒驅動 沒煩惱
為什麼我的某lib不能用(x
HI
想請教個問題
~/.bashrc中有3行是這樣寫的
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
我不太懂 [ -z "${debian_chroot:-}" ] 為什麼要加上:-
感覺直接寫 [ -z "${debian_chroot}" ] 也是OK的啊
網路上也有人問過的同樣的問題 但好像答非所問

https://askubuntu.com/questions/710610/debian-chroot-why-bother-with
我好像理出點頭緒了 似乎跟nounset這個flag有關
我再自行試試好了 謝謝
$ echo $var
$ echo $?
$ set -u
$ echo $var
$ echo ${var:-}
謝謝 看來是為了避免nounset為on時發生錯誤才這樣寫
If the debian_chroot parameter is not set or empty AND the /etc/debian_chroot file is existing and readable then set the debian_chroot parameter's value as the content of /etc/debian_chroot
看起來的確是避免觸發 nounset 所以這樣設計的,早期版本的 bash 並不支援檢查 parameter 有無被設定
CPU 除了 RISC-V 還有 MIPS
最近開源出來了
[photo](media:AgADBQAD1qgxG7jLcVTk6bSeV2EMgIZz3zIABFfyJrUghr5JstkCAAEC@telegram)