I’m currently working on some project using NetBeans Platform. This project need to have list of public packages from the jar in configuration file. So I write this quite simple code to do it manually
unzip -vb commons-beanutils-1.8.0.jar | grep 00000 | cut -c 59- | grep -v META-INF | tr / . | awk '{print "<publicPackage>" $1 "*" "</publicPackage>"}'
A the result is
<publicPackage>org.*</publicPackage> <publicPackage>org.apache.*</publicPackage> <publicPackage>org.apache.commons.*</publicPackage> <publicPackage>org.apache.commons.beanutils.*</publicPackage> ... <publicPackage>org.apache.commons.collections.*</publicPackage>
I love unix text processing utilities…