mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-12-23 16:56:35 +00:00
Update README.md
This commit is contained in:
parent
743db35c52
commit
71493924ad
25
README.md
25
README.md
@ -419,21 +419,14 @@ fileB 5 2 e
|
||||
e.g.
|
||||
fileA:
|
||||
1 0
|
||||
|
||||
2 1
|
||||
|
||||
3 1
|
||||
|
||||
4 0
|
||||
|
||||
fileB:
|
||||
|
||||
1 0
|
||||
|
||||
2 1
|
||||
|
||||
3 0
|
||||
|
||||
4 1
|
||||
|
||||
```bash
|
||||
@ -441,11 +434,8 @@ awk -v OFS='\t' 'NR=FNR{a[$1]=$2;next} NF {print $1,((a[$1]=$2)? $2:"0")}' fileA
|
||||
```
|
||||
|
||||
1 0
|
||||
|
||||
2 1
|
||||
|
||||
3 0
|
||||
|
||||
4 0
|
||||
|
||||
##### round all numbers of file (e.g. 2 significant figure)
|
||||
@ -470,11 +460,8 @@ e.g.
|
||||
seperate
|
||||
|
||||
David cat,dog
|
||||
|
||||
into
|
||||
|
||||
David cat
|
||||
|
||||
David dog
|
||||
|
||||
detail here: http://stackoverflow.com/questions/33408762/bash-turning-single-comma-separated-column-into-multi-line-string
|
||||
@ -745,21 +732,13 @@ for i in $(ls); do echo file $i;done
|
||||
wget -r -l1 -H -t1 -nd -N -np -A mp3 -e robots=off http://example.com
|
||||
```
|
||||
//-r: recursive and download all links on page
|
||||
|
||||
//-l1: only one level link
|
||||
|
||||
//-H: span host, visit other hosts
|
||||
|
||||
//-t1: numbers of retries
|
||||
|
||||
//-nd: don't make new directories, download to here
|
||||
|
||||
//-N: turn on timestamp
|
||||
|
||||
//-nd: no parent
|
||||
|
||||
//-A: type (seperate by ,)
|
||||
|
||||
//-e robots=off: ignore the robots.txt file which stop wget from crashing the site, sorry example.com
|
||||
|
||||
|
||||
@ -1295,13 +1274,9 @@ head -c 50 file
|
||||
##### group/combine rows into one row
|
||||
|
||||
e.g.
|
||||
|
||||
AAAA
|
||||
|
||||
BBBB
|
||||
|
||||
CCCC
|
||||
|
||||
DDDD
|
||||
```bash
|
||||
cat filename|paste - -
|
||||
|
Loading…
Reference in New Issue
Block a user