开发者

bash operator for logical defined-or

开发者 https://www.devze.com 2023-03-01 07:38 出处:网络
Is there an equivalent Bash operator to Perl\'s logical defined-or?Some开发者_运维百科thing akin to:

Is there an equivalent Bash operator to Perl's logical defined-or? Some开发者_运维百科thing akin to:

$a = $a // $b;

OR

$a ||= $b;


"Assign Default Values" parameter expansion.

echo "${foo:=42}"
0

精彩评论

暂无评论...
验证码 换一张
取 消