ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: How to read a file without the first n lines
Date Tue, 08 Apr 2003 15:31:08 GMT
I think I will do that (better than writing a new Filter).
Especially if you suggestion is normal Unix-behaviour.


Jan Matèrne

> -----Ursprüngliche Nachricht-----
> Von: Dominique Devienne [mailto:DDevienne@lgc.com]
> Gesendet am: Dienstag, 8. April 2003 17:06
> An: 'Ant Users List'
> Betreff: RE: How to read a file without the first n lines
> 
> Then as I said maybe you should make them to work in a useful 
> manner ;-) I'd
> say your use case requires <tailfilter lines="-2" />, which 
> gives you the
> tail of the file, minus the top 2 lines. <headfilter 
> lines="-2" /> would of
> course yield the entire file minus the bottom 2 lines. Seems 
> like a natural
> extension of these filters, consistent with their Unix brethren. --DD
> 
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Tuesday, April 08, 2003 9:59 AM
> To: user@ant.apache.org
> Subject: AW: How to read a file without the first n lines
> 
> They work ... but not like hoped :-(
> <headfilter> with negative lines-attributes gives nothing and
> <tailfilter> with negative lines-attributes gives the whole file.
> 
> 
> Jan Matèrne
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Dominique Devienne [mailto:DDevienne@lgc.com]
> > Gesendet am: Dienstag, 8. April 2003 16:29
> > An: 'Ant Users List'
> > Betreff: RE: How to read a file without the first n lines
> > 
> > If I remember correctly, the Unix head/tail also supported 
> > negative line
> > numbers, which allow to do what you want!?!? Either <head>/<tail> do
> > already, or they should be made to ;-) --DD
> > 
> > -----Original Message-----
> > From: Jan.Materne@rzf.fin-nrw.de 
> [mailto:Jan.Materne@rzf.fin-nrw.de] 
> > Sent: Tuesday, April 08, 2003 9:24 AM
> > To: user@ant.apache.org
> > Subject: How to read a file without the first n lines
> > 
> > I have problem:
> > 
> > I want to compare two files. I know that the first two lines 
> > differ (they
> > contain a timestamp), but that can be ignored.
> > So the content of lines three to n is interesting.
> > 
> > With <filterchain><head> I can read the first two lines and with
> > <filterchain><tail> I can read the last 'n' lines.
> > But I don´t know how many lines there are, so I can´t tell 
> > <tail> the number
> > of lines.
> > 
> > Any suggestions (besides writing my own Filter :-)
> > 
> > 
> > 
> > Thanks
> > Jan Matèrne
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message