mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-29 15:46:35 +00:00
add awk
This commit is contained in:
parent
64086e080f
commit
1441c484a4
@ -304,6 +304,11 @@ awk '{split($2, a,",");for (i in a) print $1"\t"a[i]} filename
|
|||||||
awk -v N=7 '{print}/bbo/&& --N<=0 {exit}'
|
awk -v N=7 '{print}/bbo/&& --N<=0 {exit}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#####print filename and last line of all files in directory
|
||||||
|
```bash
|
||||||
|
ls|xargs -n1 -I file awk '{s=$0};END{print FILENAME,s}' file'
|
||||||
|
```
|
||||||
|
|
||||||
#####add string to the beginning of a column (e.g add "chr" to column $3)
|
#####add string to the beginning of a column (e.g add "chr" to column $3)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user