Browse Source

command commands

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

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

@@ -46,3 +46,13 @@ $ echo $? # echo the exit status of cmd1

$ cmd1 && cmd2 # do cmd1, if cmd1 worked, do cmd2
```

## Compound Commands

```
{ ls; exit 0; }

$ cd /tmp && { ls; exit 0; }

$ cd /tmp && ( ls; exit 0 ) # run ls and exit in subshell
```

Loading…
Cancel
Save