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
722c78f339
commit
83a7ff99be
25
README.md
25
README.md
@ -447,12 +447,6 @@ awk 'BEGIN{OFS="\t"}$3="chr"$3'
|
||||
awk '!/bbo/' file
|
||||
```
|
||||
|
||||
##### Column subtraction
|
||||
|
||||
```bash
|
||||
cat file| awk -F '\t' 'BEGIN {SUM=0}{SUM+=$3-$2}END{print SUM}'
|
||||
```
|
||||
|
||||
##### Usage and meaning of NR and FNR
|
||||
e.g.
|
||||
fileA:
|
||||
@ -823,6 +817,18 @@ for line in $(cat myfile); do echo $line; read -n1; done
|
||||
```bash
|
||||
factor 50
|
||||
```
|
||||
##### Sum up input list (e.g. seq 10)
|
||||
|
||||
```bash
|
||||
seq 10|paste -sd+|bc
|
||||
```
|
||||
|
||||
##### Column subtraction
|
||||
|
||||
```bash
|
||||
cat file| awk -F '\t' 'BEGIN {SUM=0}{SUM+=$3-$2}END{print SUM}'
|
||||
```
|
||||
|
||||
|
||||
##### Simple math with expr
|
||||
```bash
|
||||
@ -852,6 +858,7 @@ echo "var=5;--var"| bc
|
||||
|
||||
|
||||
|
||||
|
||||
## Download
|
||||
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
||||
##### Download all from a page
|
||||
@ -1364,12 +1371,6 @@ echo $input
|
||||
seq 10
|
||||
```
|
||||
|
||||
##### Sum up input list (e.g. seq 10)
|
||||
|
||||
```bash
|
||||
seq 10|paste -sd+|bc
|
||||
```
|
||||
|
||||
##### Find average of input list/file
|
||||
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user