[vox-tech] Padding Variables in bash

Ken Herron vox-tech@lists.lugod.org
Sat, 12 Apr 2003 19:51:38 -0700


--On Saturday, April 12, 2003 06:07:01 PM -0700 Jim Angstadt 
<jimajima9@yahoo.com> wrote:

> perl has a nice way of padding variables to line
> up columns:
>
>    print "\t$a", ' 'x($block - length($a)), "\tb:
> $b \n";

Yikes! Check out printf, or write & format.

> Is there something similar in bash?

I dunno...pipe them into awk so you can use printf? :-)

-- 
Ken Herron