w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
AIX Shell Script - Formatting a long line of 255 Characters into a 10 line paragraph

How about this?

    echo "Life is not about searching for the things that could
be 
found. It's about letting the unexpected happen. And finding things 
you never searched for. Sometimes, the best way to move ahead in life 
is to admit that you've enough" |
        fmt -w 30

Result:

Life is not about
searching
for the things that could be
found.  It's about letting
the unexpected happen.
And finding things you never
searched for.  Sometimes,
the best way to move ahead
in life  is to admit that
you've enough




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.