add sed and others

This commit is contained in:
onceupon 2018-05-31 10:55:20 +08:00 committed by GitHub
parent 867908d1d4
commit e5e610f319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1186,18 +1186,6 @@ chmod +x filename
# you can now ./filename to execute it # you can now ./filename to execute it
``` ```
##### List screen
```bash
screen -d -r
```
##### Echo screen name
```bash
screen -ls
```
##### Check system (x86-64) ##### Check system (x86-64)
```bash ```bash
@ -1825,6 +1813,11 @@ lsscsi|grep SEAGATE|wc -l
or or
sg_map -i -x|grep SEAGATE|wc -l sg_map -i -x|grep SEAGATE|wc -l
``` ```
##### Get UUID of a disk (e.g. sdb)
```bash
blkid /dev/sdb
```
##### Print detail of all hard disks ##### Print detail of all hard disks
```bash ```bash
lsblk -io KNAME,TYPE,MODEL,VENDOR,SIZE,ROTA lsblk -io KNAME,TYPE,MODEL,VENDOR,SIZE,ROTA
@ -2463,6 +2456,9 @@ scroll:
Hit your screen prefix combination (C-a / control+A), then hit Escape. Hit your screen prefix combination (C-a / control+A), then hit Escape.
Move up/down with the arrow keys (↑ and ↓). Move up/down with the arrow keys (↑ and ↓).
Redirect output of an already running process in screen:
(C-a / control+A), then hit 'H'
Send command to all panes in tmux: Send command to all panes in tmux:
```bash ```bash
Ctrl-B Ctrl-B
@ -2549,4 +2545,23 @@ history -w
vi ~/.bash_history vi ~/.bash_history
history -r history -r
``` ```
##### Decimal to Binary (e.g get binary of 5)
```bash
D2B=({0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1})
echo -e ${D2B[5]}
#00000101
echo -e ${D2B[255]}
#11111111
```
##### wrap each input line to fit in specified width (e.g 4 integers per line)
```bash
echo "00110010101110001101" | fold -w4
#0011
#0010
#1011
#1000
#1101
```
=-=-=-=-=-A lot more coming!! =-=-=-=-=-=-=-=-=-=waitwait-=-=-=-=-=-=-=-=-=- =-=-=-=-=-A lot more coming!! =-=-=-=-=-=-=-=-=-=waitwait-=-=-=-=-=-=-=-=-=-