Read MANIFEST.MF of a jar from shellHow to read MANIFEST.MF file from JAR using BashWhat is the proper way to parse the entries of a manifest.mf file in jar?Unwrapping a java manifest file fin bashCheck if a directory exists in a shell scriptGet the source directory of a Bash script from within the script itselfCreate ArrayList from arrayHow do I prompt for Yes/No/Cancel input in a Linux shell script?How do I read / convert an InputStream into a String in Java?How can I create an executable JAR with dependencies using Maven?How to check if a program exists from a Bash script?In the shell, what does “ 2>&1 ” mean?Check existence of input argument in a Bash shell scriptHow to copy a folder from remote to local using scp?

How do I call a 6-digit Australian phone number with a US-based mobile phone?

Word for an event that will likely never happen again

Modeling the uncertainty of the input parameters

Why command hierarchy, if the chain of command is standing next to each other?

If I animate and control a zombie, does it benefit from Undead Fortitude when it's reduced to 0 HP?

Why is the second S silent in "Sens dessus dessous"?

Corroded Metal vs Magical Armor, should it melt it?

Running code generated in realtime in JavaScript with eval()

What unique challenges/limitations will I face if I start a career as a pilot at 45 years old?

What sort of psychological changes could be made to a genetically engineered human

Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?

How should I write this passage to make it the most readable?

In which case does the Security misconfiguration vulnerability apply to?

Do Reform Jews believe in a theistic God?

Escape Velocity - Won't the orbital path just become larger with higher initial velocity?

Markov-chain sentence generator in Python

Chunk + Enumerate a list of digits

Are there really no countries that protect Freedom of Speech as the United States does?

Why did IBM make public the PC BIOS source code?

(A room / an office) where an artist works

Why aren’t there water shutoff valves for each room?

Boss wants me to ignore a software API license prohibiting mass download

Did Pope Urban II issue the papal bull "terra nullius" in 1095?

If you know the location of an invisible creature, can you attack it?



Read MANIFEST.MF of a jar from shell


How to read MANIFEST.MF file from JAR using BashWhat is the proper way to parse the entries of a manifest.mf file in jar?Unwrapping a java manifest file fin bashCheck if a directory exists in a shell scriptGet the source directory of a Bash script from within the script itselfCreate ArrayList from arrayHow do I prompt for Yes/No/Cancel input in a Linux shell script?How do I read / convert an InputStream into a String in Java?How can I create an executable JAR with dependencies using Maven?How to check if a program exists from a Bash script?In the shell, what does “ 2>&1 ” mean?Check existence of input argument in a Bash shell scriptHow to copy a folder from remote to local using scp?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I know how I can find and unzip the MANIFEST.MF from a jar:



https://stackoverflow.com/a/7066174/927493



But MANIFEST.MF has special formatting rules. Reading a "property" is harder than reading it from as "standard" property file because values may have line breaks.



What is a robust way to read a given property (like Implementation-URL) from a MANIFEST.MF using command line?



EDIT: I added an example. The broken lines seem to start with a space, but I haven't found a specification yet.



Build-Jdk: 1.8.0_161
Implementation-URL: http://ik-rep2.continentale.loc:8081/nexus/conten
t/sites/site/de.something/release-plugin-ear/0.1.5-SN
APSHOT/release-plugin-ear









share|improve this question


























  • Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

    – ernest_k
    Mar 27 at 10:01






  • 1





    @ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

    – JF Meier
    Mar 27 at 10:05






  • 1





    this?

    – Eugene
    Mar 27 at 10:19











  • Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

    – Aserre
    Mar 27 at 10:25






  • 2





    @JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

    – Würgspaß
    Mar 27 at 11:23

















1















I know how I can find and unzip the MANIFEST.MF from a jar:



https://stackoverflow.com/a/7066174/927493



But MANIFEST.MF has special formatting rules. Reading a "property" is harder than reading it from as "standard" property file because values may have line breaks.



What is a robust way to read a given property (like Implementation-URL) from a MANIFEST.MF using command line?



EDIT: I added an example. The broken lines seem to start with a space, but I haven't found a specification yet.



Build-Jdk: 1.8.0_161
Implementation-URL: http://ik-rep2.continentale.loc:8081/nexus/conten
t/sites/site/de.something/release-plugin-ear/0.1.5-SN
APSHOT/release-plugin-ear









share|improve this question


























  • Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

    – ernest_k
    Mar 27 at 10:01






  • 1





    @ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

    – JF Meier
    Mar 27 at 10:05






  • 1





    this?

    – Eugene
    Mar 27 at 10:19











  • Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

    – Aserre
    Mar 27 at 10:25






  • 2





    @JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

    – Würgspaß
    Mar 27 at 11:23













1












1








1








I know how I can find and unzip the MANIFEST.MF from a jar:



https://stackoverflow.com/a/7066174/927493



But MANIFEST.MF has special formatting rules. Reading a "property" is harder than reading it from as "standard" property file because values may have line breaks.



What is a robust way to read a given property (like Implementation-URL) from a MANIFEST.MF using command line?



EDIT: I added an example. The broken lines seem to start with a space, but I haven't found a specification yet.



Build-Jdk: 1.8.0_161
Implementation-URL: http://ik-rep2.continentale.loc:8081/nexus/conten
t/sites/site/de.something/release-plugin-ear/0.1.5-SN
APSHOT/release-plugin-ear









share|improve this question
















I know how I can find and unzip the MANIFEST.MF from a jar:



https://stackoverflow.com/a/7066174/927493



But MANIFEST.MF has special formatting rules. Reading a "property" is harder than reading it from as "standard" property file because values may have line breaks.



What is a robust way to read a given property (like Implementation-URL) from a MANIFEST.MF using command line?



EDIT: I added an example. The broken lines seem to start with a space, but I haven't found a specification yet.



Build-Jdk: 1.8.0_161
Implementation-URL: http://ik-rep2.continentale.loc:8081/nexus/conten
t/sites/site/de.something/release-plugin-ear/0.1.5-SN
APSHOT/release-plugin-ear






java bash shell manifest.mf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 10:34







JF Meier

















asked Mar 27 at 9:59









JF MeierJF Meier

11.9k5 gold badges32 silver badges71 bronze badges




11.9k5 gold badges32 silver badges71 bronze badges















  • Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

    – ernest_k
    Mar 27 at 10:01






  • 1





    @ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

    – JF Meier
    Mar 27 at 10:05






  • 1





    this?

    – Eugene
    Mar 27 at 10:19











  • Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

    – Aserre
    Mar 27 at 10:25






  • 2





    @JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

    – Würgspaß
    Mar 27 at 11:23

















  • Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

    – ernest_k
    Mar 27 at 10:01






  • 1





    @ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

    – JF Meier
    Mar 27 at 10:05






  • 1





    this?

    – Eugene
    Mar 27 at 10:19











  • Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

    – Aserre
    Mar 27 at 10:25






  • 2





    @JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

    – Würgspaß
    Mar 27 at 11:23
















Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

– ernest_k
Mar 27 at 10:01





Have you checked What is the proper way to parse the entries of a manifest.mf file in jar??

– ernest_k
Mar 27 at 10:01




1




1





@ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

– JF Meier
Mar 27 at 10:05





@ernest_k This is interesting, but it talks about reading it from Java, not from a command line.

– JF Meier
Mar 27 at 10:05




1




1





this?

– Eugene
Mar 27 at 10:19





this?

– Eugene
Mar 27 at 10:19













Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

– Aserre
Mar 27 at 10:25





Could you give a sample input that includes an example of line breaking property ? Could you confirm that line breaking properties always begin their new lines with a space as shown in Eugene's link ?

– Aserre
Mar 27 at 10:25




2




2





@JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

– Würgspaß
Mar 27 at 11:23





@JFMeier Specification says: No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE).

– Würgspaß
Mar 27 at 11:23












1 Answer
1






active

oldest

votes


















1














Using Eugene's link, you could start by properly formating your manifest.mf file, then pipe the formatted output to awk to extract the value of the property you need :



perl -0777 -wpe 's/n //g' MANIFEST.MF | awk '/PROPERTY/print $2' 





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374415%2fread-manifest-mf-of-a-jar-from-shell%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Using Eugene's link, you could start by properly formating your manifest.mf file, then pipe the formatted output to awk to extract the value of the property you need :



    perl -0777 -wpe 's/n //g' MANIFEST.MF | awk '/PROPERTY/print $2' 





    share|improve this answer





























      1














      Using Eugene's link, you could start by properly formating your manifest.mf file, then pipe the formatted output to awk to extract the value of the property you need :



      perl -0777 -wpe 's/n //g' MANIFEST.MF | awk '/PROPERTY/print $2' 





      share|improve this answer



























        1












        1








        1







        Using Eugene's link, you could start by properly formating your manifest.mf file, then pipe the formatted output to awk to extract the value of the property you need :



        perl -0777 -wpe 's/n //g' MANIFEST.MF | awk '/PROPERTY/print $2' 





        share|improve this answer













        Using Eugene's link, you could start by properly formating your manifest.mf file, then pipe the formatted output to awk to extract the value of the property you need :



        perl -0777 -wpe 's/n //g' MANIFEST.MF | awk '/PROPERTY/print $2' 






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 10:48









        AserreAserre

        3,4893 gold badges22 silver badges45 bronze badges




        3,4893 gold badges22 silver badges45 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374415%2fread-manifest-mf-of-a-jar-from-shell%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현