mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 21:07:00 +00:00
add sed
This commit is contained in:
parent
0947dbc550
commit
55e4c097c7
21
README.md
21
README.md
@ -295,6 +295,11 @@ for i in T000086_1.02.n T000086_1.02.p;do sed "s/$/\t${i/*./}/" $i;done >T000086
|
|||||||
sed ':a;N;$!ba;s/\n//g'
|
sed ':a;N;$!ba;s/\n//g'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Print a particular line (e.g. 123th line)
|
||||||
|
```bash
|
||||||
|
sed -n -e '123p'
|
||||||
|
```
|
||||||
|
|
||||||
##### Print a number of lines (e.g. line 10th to line 33 rd)
|
##### Print a number of lines (e.g. line 10th to line 33 rd)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -1498,46 +1503,50 @@ q -d "," "select c3,c4,c5 from /path/to/file.txt where c3='foo' and c5='boo'"
|
|||||||
```
|
```
|
||||||
|
|
||||||
##### Sreen and tmux
|
##### Sreen and tmux
|
||||||
create session and attach
|
create session and attach:
|
||||||
```bash
|
```bash
|
||||||
screen
|
screen
|
||||||
or
|
or
|
||||||
tmux
|
tmux
|
||||||
```
|
```
|
||||||
|
|
||||||
create detached session foo
|
create detached session foo:
|
||||||
```bash
|
```bash
|
||||||
screen -S foo -d -m
|
screen -S foo -d -m
|
||||||
or
|
or
|
||||||
tmux new -s foo -d
|
tmux new -s foo -d
|
||||||
```
|
```
|
||||||
|
|
||||||
list sessions
|
list sessions:
|
||||||
```bash
|
```bash
|
||||||
screen -ls
|
screen -ls
|
||||||
or
|
or
|
||||||
tmux ls
|
tmux ls
|
||||||
```
|
```
|
||||||
|
|
||||||
attach
|
attach:
|
||||||
```bash
|
```bash
|
||||||
screen -r
|
screen -r
|
||||||
or
|
or
|
||||||
tmux attach
|
tmux attach
|
||||||
```
|
```
|
||||||
|
|
||||||
attach to session foo
|
attach to session foo:
|
||||||
```bash
|
```bash
|
||||||
screen -r foo
|
screen -r foo
|
||||||
or
|
or
|
||||||
tmux attach -t foo
|
tmux attach -t foo
|
||||||
```
|
```
|
||||||
kill session foo
|
kill session foo:
|
||||||
```bash
|
```bash
|
||||||
screen -r foo -X quit
|
screen -r foo -X quit
|
||||||
or
|
or
|
||||||
tmux kill-session -t foo
|
tmux kill-session -t foo
|
||||||
```
|
```
|
||||||
|
scroll:
|
||||||
|
Hit your screen prefix combination (C-a / control+A), then hit Escape.
|
||||||
|
Move up/down with the arrow keys (↑ and ↓).
|
||||||
|
|
||||||
|
|
||||||
## System
|
## System
|
||||||
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
||||||
|
Loading…
Reference in New Issue
Block a user