📅  最后修改于: 2022-03-11 14:49:33.755000             🧑  作者: Mango
You can use test -d (see man test).
-d file True if file exists and is a directory.
For example:
test -d "/etc" && echo Exists || echo Does not exist