I need to read MANIFEST.MF maven manifest file from \"some.jar\" using bash
use unzip:
$ unzip -q -c $JARFILE_PATH META-INF/MANIFEST.MF
that will quietly (-q) read the path META-INF/MANIFEST.MF from the jarfile (which is compressed using the zip format) to stdout (-c). You can then pipe the output to other command to answer questions like 'what is the main class for this jar:
$ unzip -q -c $JARFILE_PATH META-INF/MANIFEST.MF | grep 'Main-Class' | cut -d ':' -f 2
(this removes all lines which don't contain the string Main-Class, then splits the line at :, keeping only the second field, the class name). Of course, either define $JARFILE_PATH appropriately or replace $JARFILE_PATH with the path to a jarfile you're interested in.