coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] seq: Add the ability to process escape characters


From: Erik Auerswald
Subject: Re: [coreutils] seq: Add the ability to process escape characters
Date: Fri, 29 Oct 2010 10:05:32 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi,

On Fri, Oct 29, 2010 at 07:38:19AM +0200, Jim Meyering wrote:
> William Plusnick wrote:
> > When I was looking at seq I noticed it did not process escape character in 
> > the
> > separator string. This renders it nearly impossible to separate the numbers 
> > by
> > tabs in Bash because when you hit the tab key it tries to autofill and 
> > doesn't
> > add the tab in directly. A more concrete example of this is:
> > $ seq -s"\t" 3
> > 1\t2\t3
> > $ seq -s" <HITS TAB KEY>
> > DIRECTORY LISTING
> >
> > How would you feel about me adding a function that will interpret the escape
> > characters?
> 
> Not needed, since you can do this e.g., with bash and zsh:
> 
> $ seq -s$'\t' 3
> 1     2       3
> 
> Or, more portably,
> 
>     seq -s"`printf '\t'`" 3

Another way is to use the key sequence CTRL-V TAB:

$ seq -s"<CTRL>+<V> <TAB>" 3

Erik
-- 
[T]he essence of XML is this: the problem it solves is not hard,
and it does not solve the problem well.
                        -- The Essence of XML by Jérôme Siméon, Philip Wadler



reply via email to

[Prev in Thread] Current Thread [Next in Thread]