| (c && d) in bash. Currently I have this, but it's not working, and it's just the result of me playing around with syntax.. ...

问题描述 投票:0回答:1
bc is an arbitrary-precision math and logic calculator. For cygwin bash, bc must be explicitly installed.

(a && b) || (c && d)试图基本做到等同于

在bash中。

if [[ -f $TRASH/.$arg && -f $arg ]  || [ -d $TRASH/.$arg && -d $arg ]]

目前我有这个功能,但是没有用,这只是我玩弄语法的结果。

原本我只是检查两个文件是否存在,但我需要扩展到看看文件or目录是否存在。
bash boolean-logic
1个回答
0
投票

想基本做到相当于(a &&b)。

© www.soinside.com 2019 - 2024. All rights reserved.