ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Remove a specific line from a file.
Date Wed, 12 Nov 2003 07:12:08 GMT
With filterchains [1].
Especially the <linecontains> and <linecontainsregexp> would be interesting
for you.


Jan

[1] http://ant.apache.org/manual-1.6beta/CoreTypes/filterchain.html


> -----Original Message-----
> From: Robert Priest [mailto:Robert.Priest@bentley.com]
> Sent: Wednesday, November 12, 2003 12:13 AM
> To: 'Ant Users List'
> Subject: Remove a specific line from a file.
> 
> 
> 
> Can anyone tell me how to remove a specific line from a text 
> file using ant.
> 
> 
> Let say I have the following file, let's call it "talking.txt":
> 
> --- begin file ---
> 
> Jenny says This is  my file.
> Johnny Says this is my file.
> Robert says this is my file.
> Joan Says This is my file.
> 
> --- End file ---
> 
> 
> HOw can I strip out only the line that says "Robert says this 
> is my file." ?
> 
> ---------------------------------------------------------------------
> 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