瀏覽代碼

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)
```

Loading…
取消
儲存