On Mon, Jan 26, 2009 at 03:03:44PM -0800, Chuck Swiger wrote: > On Jan 26, 2009, at 3:05 PM, Svein Halvor Halvorsen wrote: > >Do you have a suggestion to solve the following problem without > >using printf(1): > > > >I have a text file that I want to print in a "box" on a terminal > >from a shell script. Now I've padded the lines with spaces to a > >certain length using printf %-70s and appended the box drawing > >character. Is there another simple way that will work with utf-8? > > My first thought was about dialog(1), but I'm not sure whether that > deals with UTF8 any better...?
There's dialog(1) in the FreeBSD tree, and dialog(1) on my website. The latter can work with UTF-8 (if it's built with ncursesw). But that's a little different from printf... -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
pgpQnR3vgPxNo.pgp
Description: PGP signature