Tag Info

New answers tagged

0

You can trim only the last space character in any series of space characters like: sed 's/\( *\) /\1/g' And since you always have at least two space chars in a row, this will always work to trim the splits out just as you wish: column -t -s\ <<\COLS | sed 's/\( *\) /\1/g' 0 3.1415926535 s 00 3.141592653 so 000 3.14159265 som 0000 3.1415926 some ...


1

Try this way: $ echo 'a b' | column -t -s '' a b From column manpage: -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. -s Specify a set of characters to be used to delimit columns for the ...



Top 50 recent answers are included