E.g. I have a file (produced with echo -e "var1\tvar2\t\var3\tvar4" > foo
) that are output as:
$ cat foo
case elems meshing nlsys
uniform 2350 0.076662 2.78
non-conformal 348 0.013332 0.55
scale 318 0.013333 0.44
smarter 504 0.016666 0.64
submodel 360 .009999 0.40
unstruct-quad 640 0.019999 0.80
unstruct-tri 1484 0.01 0.88
I'd prefer the output like this (here I used vim
and :set tabstop=14
):
case elems meshing nlsys
uniform 2350 0.076662 2.78
non-conformal 348 0.013332 0.55
scale 318 0.013333 0.44
smarter 504 0.016666 0.64
submodel 360 .009999 0.40
unstruct-quad 640 0.019999 0.80
unstruct-tri 1484 0.01 0.88
I can get the same functionality with cat
if I use $ tabs=15
in bash (see this question). Is there a program that does this kind of formatting automatically? I don't want to experiment with the tabs
value before cat
ing a file.