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: Paul Eggert
Subject: Re: Additional feature for the seq command
Date: Fri, 29 Apr 2005 10:29:49 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

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".




reply via email to

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