mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-29 15:46:35 +00:00
add others
Run multiple commands in background
This commit is contained in:
parent
d8fed85f58
commit
83cd707f93
11
README.md
11
README.md
@ -2230,7 +2230,7 @@ zmore filename
|
|||||||
zless filename
|
zless filename
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Run in background, output error file
|
##### Run command in background, output error file
|
||||||
```bash
|
```bash
|
||||||
some_commands &>log &
|
some_commands &>log &
|
||||||
|
|
||||||
@ -2248,6 +2248,15 @@ some_commands 2>&1 >>outfile
|
|||||||
#0: standard input; 1: standard output; 2: standard error
|
#0: standard input; 1: standard output; 2: standard error
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Run multiple commands in background
|
||||||
|
```bash
|
||||||
|
# run sequentially
|
||||||
|
(sleep 2; sleep 3) &
|
||||||
|
|
||||||
|
# run parallelly
|
||||||
|
sleep 2 & sleep 3 &
|
||||||
|
```
|
||||||
|
|
||||||
##### Run process even when logout (immune to hangups, with output to a non-tty)
|
##### Run process even when logout (immune to hangups, with output to a non-tty)
|
||||||
```bash
|
```bash
|
||||||
# e.g. Run myscript.sh even when log out.
|
# e.g. Run myscript.sh even when log out.
|
||||||
|
Loading…
Reference in New Issue
Block a user