*Nix Commands
Create package
Below command will create a package from files located in different directories & files with and without preserving the directory structure.
-C
is used to change directory and then include the following file. Without it the directory structure is preserved. The files and folder appear in the root directory
String Operations
Check null value in strings
Split Strings
Miscellaneous
Find jar versions of all jars in a folder from its manifest file ls | xargs -I {} 'unzip {} META-INF/MANIFEST.MF; version=`cat META-INF/MANIFEST.MF | grep "Implementation-Version\|Bundle-Version" | sed "s/Bundle-Version: //" | sed "s/Implementation-Version: //"`;echo {} -------- $version >> jar-version.txt'
Last updated