Browse Source

math commands

master
Anthony Fadly 1 year ago
parent
commit
523ae63eb4
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      sep19-more-commands.md

+ 12
- 0
sep19-more-commands.md View File

@@ -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…
Cancel
Save