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: AW: How to delete files from a zip/jar?
Date Tue, 07 Dec 2004 15:49:01 GMT
> >> 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


Cool. I knew that *nix systems have better script support than mine *dows
:-)
http://www.openbsd.org/cgi-bin/man.cgi?query=xargs


Jan

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