Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 96831 invoked from network); 8 Apr 2003 16:16:00 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 8 Apr 2003 16:16:00 -0000 Received: (qmail 84797 invoked from network); 8 Apr 2003 16:15:59 -0000 Received: from unknown (HELO mumasankar) (127.0.0.1) by localhost.apache.org with SMTP; 8 Apr 2003 16:15:59 -0000 Message-ID: <004e01c2fde9$ff7043f0$270610ac@manu.com> From: "Magesh Umasankar" To: "Ant Users List" References: Subject: Re: How to read a file without the first n lines Date: Tue, 8 Apr 2003 12:14:56 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: localhost.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Instead of overloading the meaning of number of "lines" and try to resemble Unix syntax closely, I suggest that a new attribute be introduced namely "skip" which would convey the number of lines that should be skipped before the head or tail operation is performed. The lines attribute would logically have to be optional. I do not think a new filter like subfilter is necessary - sub filter is actually a comination of two filter readers in the filter chain - namely tail and head (with the above suggested modification). Cheers, Magesh ----- Original Message ----- From: "Stefan Bodewig" To: Sent: Tuesday, April 08, 2003 12:04 PM Subject: Re: How to read a file without the first n lines > On Tue, 8 Apr 2003, Dominique Devienne wrote: > > > Does that mean you are +1 or -1 for this extension? Seems logical to > > me. > > In the head-spinning sematics of tail's argument (-1 == 1 and +1 != 1)? > 8-) > > It means that supporting a way to filter everything after the first n > lines seems a good idea - yes, that's a +1 to the concept. > > Following the Unix tools would mean if you > wanted the first ten lines, this is not intuitive at all - and not > doable without breaking the API. > > What would be the alternative, now that we are unable to be compatible > to tail(1) anyway? > > ? > > to read from line 10 and > drop the last two lines as well (here positive numbers count from the > start and negatives from the end)? > > In the later case, would be equivalent to > and was > . Something the implementations of head- > and tailfilter could take advantage of. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >