README.md - minor fixes and updates
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
c7a0210c14
commit
93d83a4ab2
@ -331,7 +331,7 @@ true && { echo success;} || { echo failed; }
|
|||||||
some_command > >(/bin/cmd_for_stdout) 2> >(/bin/cmd_for_stderr)
|
some_command > >(/bin/cmd_for_stdout) 2> >(/bin/cmd_for_stderr)
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Pipe stdout and stderr to separate commands
|
###### Redirect stdout and stderr each to separate files and print both to the screen
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
(some_command 2>&1 1>&3 | tee errorlog ) 3>&1 1>&2 | tee stdoutlog
|
(some_command 2>&1 1>&3 | tee errorlog ) 3>&1 1>&2 | tee stdoutlog
|
||||||
@ -343,6 +343,12 @@ some_command > >(/bin/cmd_for_stdout) 2> >(/bin/cmd_for_stderr)
|
|||||||
history | awk '{ a[$2]++ } END { for(i in a) { print a[i] " " i } }' | sort -rn | head
|
history | awk '{ a[$2]++ } END { for(i in a) { print a[i] " " i } }' | sort -rn | head
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###### Empty a file (truncate to 0 size)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
>filename
|
||||||
|
```
|
||||||
|
|
||||||
###### Quickly backup a file
|
###### Quickly backup a file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user