什么是相当于以下bash的nushell。
if [[ -d $LOCATION ]]; then
elif [[ -f $LOCATION ]]; then
fi发布于 2022-08-23 13:38:13
我觉得我错过了一种更实用的方法,但是:
if ($LOCATION | path type) == "file" {
echo "It's a file."
} else if ($LOCATION | path type) == "dir" {
echo "It's a directory"
}https://unix.stackexchange.com/questions/714543
复制相似问题