bug-coreutils
[Top][All Lists]
Advanced

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

Re: Additional feature for the seq command


From: Axel Liljencrantz
Subject: Re: Additional feature for the seq command
Date: Fri, 29 Apr 2005 22:10:58 +0200 (MEST)




On Fri, 29 Apr 2005, Paul Eggert wrote:

> Axel Liljencrantz <address@hidden> writes:
>
> > I did this since the way I want to use this feature is for doing
> > things with sets of data that is split in multiple files with names
> > like sampa.asc, sampb.asc, sampc.asc, etc..
>
> Aha!  That helps to explain things.
>
> In that case, why not make this an alternative to --format?
> For example, suppose I want to print a sequence of California
> automobile license plate numbers, whose syntax is
>
>   [1-9]?[A-Z][A-Z][A-Z][0-9][0-9][0-9]
>
> Then I could do it with a command like this:
>
>    seq --template='[1-9]?[A-Z][A-Z][A-Z][0-9][0-9][0-9]' 3ABC999 3 3ABD005
>
> and the output would be:
>
>    3ABC999
>    3ABD002
>    3ABD005
>
> This is a nice generalization, both of your idea, and of the 'jot'
> command's idea that James Youngman mentioned.
>
> Perhaps it is _too_ general (:-), but something simpler would be OK
> too.  But the point is that one should be able to easily generate
> patterns like the one used by the output of "split".
>

I like it. That is a very nice generalization of my initial
suggestion. I will try to implement it. But I definitly think that it
should still be possible to do

  seq b 2 g

to output

  b
  d
  f

That way seq would keep the simple things simple, and the complicated
things doable.

--
Axel




reply via email to

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