浏览代码

math commands

master
Anthony Fadly 1年前
父节点
当前提交
523ae63eb4
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      sep19-more-commands.md

+ 12
- 0
sep19-more-commands.md 查看文件

@@ -58,3 +58,15 @@ $ cd /tmp && ( ls; exit 0 ) # run ls and exit in subshell

( ls; exit $? ) # exit subshell the same exit status of ls
```

## Math Commands

```
$ $((5+3)) # do 5+3

$ echo $? # exit status is 0

$ $((3-3)) # do 3+3

$ echo $? # exit status is 1 (because result is zero)
```

正在加载...
取消
保存