Subject: Re: way to restore 'ls' formatting after pipe
To: Henry Nelson <netb@yuba.ne.jp>
From: Peter Seebach <seebs@plethora.net>
List: netbsd-help
Date: 11/03/2006 18:59:33
In message <20061104005410.GA8365@yuba.ne.jp>, Henry Nelson writes:
>In order to be able to display file names encoded in sjis with ls, I've
>created an alias: 'ls | iconv -f sjis -t euc-jp'.  This works well enough
>except that I lose the multi-column output of ls.  Is there some way to
>re-format the output into columns after the charset conversion?

One option would be "ls -C"; the default is to format in columns to a tty,
but not to a pipe.

Or, look at programs like 'rs'.  (I have one of my own, named 'c', that DTRT
in nearly all cases.)

-s