mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
Update README.md
This commit is contained in:
parent
83a7ff99be
commit
08bf087b3d
13
README.md
13
README.md
@ -522,12 +522,6 @@ detail here: http://stackoverflow.com/questions/33408762/bash-turning-single-c
|
||||
awk '{split($2,a,",");for(i in a)print $1"\t"a[i]}' file
|
||||
```
|
||||
|
||||
##### Sum up a file (each line in file contains only one number)
|
||||
|
||||
```bash
|
||||
awk '{s+=$1} END {print s}' filename
|
||||
```
|
||||
|
||||
##### Average a file (each line in file contains only one number)
|
||||
```bash
|
||||
awk '{s+=$1}END{print s/NR}'
|
||||
@ -823,6 +817,13 @@ factor 50
|
||||
seq 10|paste -sd+|bc
|
||||
```
|
||||
|
||||
##### Sum up a file (each line in file contains only one number)
|
||||
|
||||
```bash
|
||||
awk '{s+=$1} END {print s}' filename
|
||||
```
|
||||
|
||||
|
||||
##### Column subtraction
|
||||
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user