[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#688046: ITP: out -- utility for producing UTF-8 output to standard streams and terminal.

On 18/09/12 19:04, Neil Williams wrote:
> On Tue, 18 Sep 2012 11:00:46 +0100
> "James" <james.hunt@canonical.com> wrote:
>> Package: wnpp
>> Severity: wishlist
>> Owner: James Hunt <james.hunt@ubuntu.com>
>> * Package name    : out
> Terrible choice of name - utf8-out ?
>> Command-line tool that can produce UTF-8 (Unicode) strings in various ways and
>> direct them to standard output, standard error or direct to the terminal
>> without the need for shell support. Strings can be repeated, delayed,
>> randomly-generated, written to arbitrary file descriptors, interspersed with
>> other characters and generated using ranges. Printf(1)-style escape
>> sequences are supported along with extended escape sequences.
>> This utility sits somewhere between echo(1) and printf(1) in
>> functionality with a dash of seq(1) thrown in.
> If that's true, why hasn't this been included into shells already?
Well, zsh and bash do provide similar facilities but
out/utf8out/foo/whatever would be able to provide a shell-agnostic
facility to produce such output (like echo(1) and printf(1) which some
shells have I appreciated added as built-ins).

> Struggling to see a use-case for it, TBH, which doesn't help with an
> alternative name and may indicate that the long description doesn't
> really describe why it would be useful. Is this just for test suites?
> What needs this utility?
Its striving to be a generic facility to produce output filling the gap
between echo and printf as alluded to. Admittedly, I did write this as a
test tool, but have attempted to make it as general-purpose as possible.
Personally, I can imagine quite a few use cases for this utility in
shell scripts. See the examples in the man page for some ideas.

Kind regards,

James Hunt

Reply to: