automatic word wrapping

Hallo,

I want to have this Output:

Name     Street   Phone    Mail     Favorite_thing_o
                                    f_what_ever_you_
                                    want
Jak      street1  0123     jak@test blue egs
                           .com
O'Neill  street2  4567     neil@tes red_horses_in_my
                           t.com    _ranch

I get the inputs from a file "inputs.txt" like this:

Name Street Phone Mail Favorite_thing_of_what_ever_you_want
Jak street1 0123 jak@test.com blue_egs
O'Neill street2 4567 neil@test.com red_horses_in_my_ranch

Is this possible with printf? How can I make this?

I need something like this:

printf "%8.s %8.s %8.s %8.s %16.s\n" `cat inputs.txt`

(the printf example above is nonsense, i know - but maybe there is any similar solution :D)

Too complicated for anything but perl (that I know of):

#!/bin/perl -w
format STDOUT_TOP =
Name     Street   Phone    Mail     Favorite thing
                                              of what ever you
                                               want
===============================================
.

@<<<<<< @<<<<<<< @<<<<<<< @<<<<<<<  ^<<<<<<<<<<<<<<<
@line
~~                        ^<<<<<<<  ^<<<<<<<<<<<<...
$line[-1]
.
while (<>) {
 @line=split(';');
 write;
}

Few perl coders today even realize this is what perl was initially designed for. Ah the good old days. :wink:

(Seriously, I didn't start using perl until probably version 4.009).