ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves <yves.mar...@elca.ch>
Subject Re: AW: How to delete files from a zip/jar?
Date Tue, 07 Dec 2004 15:44:18 GMT
Jan.Materne@rzf.fin-nrw.de writes:

> 1.  (*) text/plain          
>
>> zip -d target.jar `jar -tf compare.jar | grep \.class`
>
> Nice command :-)
> But the 
>     `jar -tf compare.jar | grep \.class`
> is evaluated by the shell to get a fileset which is passed to
> the zip command.
>
> So I think you have to split that command in two.

 The magic xargs comes here for you !!

  jar tf compare.jar | grep \.class | xargs zip -d target.jar

 Enjoy shell
-- 
Yves


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


Mime
View raw message