mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 12:57:01 +00:00
add awk
This commit is contained in:
parent
a8a00d052d
commit
e7d3e325d2
13
README.md
13
README.md
@ -415,6 +415,19 @@ awk '{while (match($0, /[0-9]+\[0-9]+/)){
|
||||
```bash
|
||||
awk '{printf("%s\t%s\n",NR,$0)}'
|
||||
```
|
||||
#####break combine column data into rows
|
||||
|
||||
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
|
||||
```bash
|
||||
awk '{split($2,a,",");for(i in a)print $1"\t"a[i]}' file
|
||||
```
|
||||
|
||||
|
||||
##Xargs
|
||||
[[back to top](#handy-bash-oneliner-commands-for-tsv-file-editing)]
|
||||
|
Loading…
Reference in New Issue
Block a user