mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2024-11-23 05:03:52 +00:00
Update README.md
This commit is contained in:
parent
e7d3e325d2
commit
bf4104af92
1 changed files with 5 additions and 0 deletions
|
@ -419,10 +419,15 @@ awk '{printf("%s\t%s\n",NR,$0)}'
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
seperate
|
seperate
|
||||||
|
|
||||||
David cat,dog
|
David cat,dog
|
||||||
|
|
||||||
into
|
into
|
||||||
|
|
||||||
David cat
|
David cat
|
||||||
|
|
||||||
David dog
|
David dog
|
||||||
|
|
||||||
detail here: http://stackoverflow.com/questions/33408762/bash-turning-single-comma-separated-column-into-multi-line-string
|
detail here: http://stackoverflow.com/questions/33408762/bash-turning-single-comma-separated-column-into-multi-line-string
|
||||||
```bash
|
```bash
|
||||||
awk '{split($2,a,",");for(i in a)print $1"\t"a[i]}' file
|
awk '{split($2,a,",");for(i in a)print $1"\t"a[i]}' file
|
||||||
|
|
Loading…
Reference in a new issue