reldb
1
Hi
I have one file which is having data like
10201 10202 10205 10206 10207 10208 10209 10210 10211 10213 10215
10801 10802
11406 11415 11422 11426
11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11530
11604 11608 11611
11717 11718 11719 11722 11725 11726 11727 11728 11729 11730 11731 11732 11736
some line are having 5 fields are some 10 means it is not fix some lines are empty
I want to rearrange this file so that each line is having only one field
eg
11717
11718
11719
11712
etc
how can i do this ?
reborg
3
tr -s '[:blank:]' '\n' < file
Or, without external commands, if your shell has the "printf" builtin
(for example if you use shell, other than sh):
printf "%s\n" $(<file)