ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woodchuck <woodchuc...@yahoo.com>
Subject Re: <replaceregexp> to wipe out everything in a file
Date Fri, 18 Jun 2004 14:37:44 GMT
i'm not sure if <echo> would work in my situation. 
i'm converting existing files that have content to
become content-less files.  the filenames must remain
unchanged, and i'm applying this on many files
existing in many sub folders.  the <replaceregexp>
does what i need in one ant task definition.

if you could figure out how to use <echo> in my
situation by all means please let me know!  :)

thx!

--- Guru Balse <guru.balse@oracle.com> wrote:
> Just use <echo file="tmp.txt" message=""
> append="false" />
> :-)
> 
> Woodchuck wrote:
> > 
> > perfect!!  my files are 0 bytes in size now!!
> > thanks!!
> > 
> > <replaceregexp flags="s">
> >   <regexp pattern=".*"/>
> >   <substitution expression=""/>
> >   ..
> > </replaceregexp>
> > 
> > --- "Anderson, Kajsa (TLR Corp)"
> > <Kajsa.Anderson@thomson.com> wrote:
> > > Have you tried the singleline flag?
> > >
> > > From the manual:
> > > The flags to use when matching the regular
> > > expression. For more information, consult the
> Perl5
> > > syntax
> > > s : Singleline. Treat the string as a single
> line of
> > > input, using "." to match any character,
> including a
> > > newline, which normally, it would not match.
> > >
> > > -----Original Message-----
> > > From: Woodchuck [mailto:woodchuck_5@yahoo.com]
> > > Sent: Thursday, June 17, 2004 10:41 AM
> > > To: user@ant.apache.org
> > > Subject: <replaceregexp> to wipe out everything
> in a
> > > file
> > >
> > >
> > > is there a way to wipe out an entire file?
> > > i just want everything to be blank.
> > >
> > > i used the following:
> > >
> > > <replaceregexp byline="true">
> > >   <regexp pattern="(.*)"/>
> > >   <substitution expression=""/>
> > >
> > > now i have a blank empty file, but there are
> still
> > > many lines (carriage returns) in that file.
> > >
> > > i want to eliminate *everything* so that the
> only
> > > thing in the file is EOF character, no line
> returns,
> > > no nothing at all.
> > >
> > > does anyone know how to do this?
> > >
> > > i tried setting byline=false but it didn't work
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - You care about security. So do we.
> > > http://promotions.yahoo.com/new_mail
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > 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
> > >
> > >
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> 
> -- 
> Guru Balse
>    Oracle - Server Technologies - iAS Integration QA
>    Work: 650.506.1611 (1op668 - HQ)
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message