Looking for a column formatting script, I have the feeling that it could be a single awk line. Ideally, a small shell script is all I need.
The data is divided into a tab, each cell in each row has a variable length and, of course, may contain spaces.
So we have something like this
dasj dhsahdwe dhasdhajks ewqhehwq dsajkdhas
e dward das dsaw das daswf
fjdk ewf jken dsajkw dskdw
hklt ewq vn1 daskcn daskw
You should get something like this:
dasj dhsahdwe dhasdhajks ewqhehwq dsajkdhas
e dward das dsaw das daswf
fjdk ewf jken dsajkw dskdw
hklt ewq vn1 daskcn daskw
Ideally, you can adjust the number of hard intervals between them. Better yet, if it looks column by column, so the leading short cells do not all receive the same legal complement.
Not perfect:
1 dhsahdwe dhasdhajks ewqhehwq dsajkdhas
2 das dsaw das daswf
3 ewf jken dsajkw dskdw
4 ewq vn1 daskcn daskw
Ideal:
1 dhsahdwe dhasdhajks ewqhehwq dsajkdhas
2 das dsaw das daswf
3 ewf jken dsajkw dskdw
4 ewq vn1 daskcn daskw
nepotism
source share