Using AWK to parse from XML The Next CEO of Stack OverflowBEGIN and END with the awk commandParse/Manipulate in awkUsing getline with NR in awkhow to use n( and )n as delimiter in awkHow to print same lines multiple times with variables changed using Sed/Awk/ anything?Extract and delete the first occurrence of the XML tag multiple timesUsing awk as simple template engine, how to modify output of last line from getlinecompare and print the values in two arrays using awkCount the number of occurrences of a substring in a stringCompare dates using awk in bash

Reshaping json / reparing json inside shell script (remove trailing comma)

How to get the last not-null value in an ordered column of a huge table?

Why am I getting "Static method cannot be referenced from a non static context: String String.valueOf(Object)"?

What was Carter Burke's job for "the company" in Aliens?

Could a dragon use its wings to swim?

Can someone explain this formula for calculating Manhattan distance?

Is it convenient to ask the journal's editor for two additional days to complete a review?

Decide between Polyglossia and Babel for LuaLaTeX in 2019

Can Sneak Attack be used when hitting with an improvised weapon?

How to use ReplaceAll on an expression that contains a rule

What day is it again?

In the "Harry Potter and the Order of the Phoenix" video game, what potion is used to sabotage Umbridge's speakers?

Help! I cannot understand this game’s notations!

How did Beeri the Hittite come up with naming his daughter Yehudit?

Does destroying a Lich's phylactery destroy the soul within it?

Getting Stale Gas Out of a Gas Tank w/out Dropping the Tank

Does higher Oxidation/ reduction potential translate to higher energy storage in battery?

What happened in Rome, when the western empire "fell"?

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

What is the difference between "hamstring tendon" and "common hamstring tendon"?

Calculate the Mean mean of two numbers

"Eavesdropping" vs "Listen in on"

Physiological effects of huge anime eyes

Is there a reasonable and studied concept of reduction between regular languages?



Using AWK to parse from XML



The Next CEO of Stack OverflowBEGIN and END with the awk commandParse/Manipulate in awkUsing getline with NR in awkhow to use n( and )n as delimiter in awkHow to print same lines multiple times with variables changed using Sed/Awk/ anything?Extract and delete the first occurrence of the XML tag multiple timesUsing awk as simple template engine, how to modify output of last line from getlinecompare and print the values in two arrays using awkCount the number of occurrences of a substring in a stringCompare dates using awk in bash










-2















I need just the first instance of an ANSI formatted date (YYYY-MM-DD) from the string shown below.



PosMntReq ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">


The command I wrote with awk does not provide the date



v_business_date=$(awk -F= 'NR==4 print $5' XMLCD02)

bash-4.2$ echo $v_business_date
"2019-03-27" TxnTm


The line with the date will be in the file many times; I want the first occurrence of this line.










share|improve this question
























  • Are you parsing an XML file?

    – glenn jackman
    2 days ago











  • Yes..This is an XML file.

    – user313150
    2 days ago






  • 5





    Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

    – glenn jackman
    2 days ago






  • 2





    This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

    – glenn jackman
    2 days ago















-2















I need just the first instance of an ANSI formatted date (YYYY-MM-DD) from the string shown below.



PosMntReq ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">


The command I wrote with awk does not provide the date



v_business_date=$(awk -F= 'NR==4 print $5' XMLCD02)

bash-4.2$ echo $v_business_date
"2019-03-27" TxnTm


The line with the date will be in the file many times; I want the first occurrence of this line.










share|improve this question
























  • Are you parsing an XML file?

    – glenn jackman
    2 days ago











  • Yes..This is an XML file.

    – user313150
    2 days ago






  • 5





    Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

    – glenn jackman
    2 days ago






  • 2





    This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

    – glenn jackman
    2 days ago













-2












-2








-2








I need just the first instance of an ANSI formatted date (YYYY-MM-DD) from the string shown below.



PosMntReq ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">


The command I wrote with awk does not provide the date



v_business_date=$(awk -F= 'NR==4 print $5' XMLCD02)

bash-4.2$ echo $v_business_date
"2019-03-27" TxnTm


The line with the date will be in the file many times; I want the first occurrence of this line.










share|improve this question
















I need just the first instance of an ANSI formatted date (YYYY-MM-DD) from the string shown below.



PosMntReq ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">


The command I wrote with awk does not provide the date



v_business_date=$(awk -F= 'NR==4 print $5' XMLCD02)

bash-4.2$ echo $v_business_date
"2019-03-27" TxnTm


The line with the date will be in the file many times; I want the first occurrence of this line.







shell-script awk xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Jeff Schaller

44.4k1162143




44.4k1162143










asked 2 days ago









user313150user313150

54




54












  • Are you parsing an XML file?

    – glenn jackman
    2 days ago











  • Yes..This is an XML file.

    – user313150
    2 days ago






  • 5





    Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

    – glenn jackman
    2 days ago






  • 2





    This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

    – glenn jackman
    2 days ago

















  • Are you parsing an XML file?

    – glenn jackman
    2 days ago











  • Yes..This is an XML file.

    – user313150
    2 days ago






  • 5





    Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

    – glenn jackman
    2 days ago






  • 2





    This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

    – glenn jackman
    2 days ago
















Are you parsing an XML file?

– glenn jackman
2 days ago





Are you parsing an XML file?

– glenn jackman
2 days ago













Yes..This is an XML file.

– user313150
2 days ago





Yes..This is an XML file.

– user313150
2 days ago




5




5





Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

– glenn jackman
2 days ago





Then you'll want to use an XML parser. xmlstarlet is a good choice for command line work. This simplifies your work to extract value, as you basically just need the XPath to that attribute.

– glenn jackman
2 days ago




2




2





This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

– glenn jackman
2 days ago





This Stack Overflow page provides guidance on how to ask a good question: How to create a Minimal, Complete, and Verifiable example

– glenn jackman
2 days ago










3 Answers
3






active

oldest

votes


















3














Making some assumptions about your data:



$ cat file.xml
<root>
<node1>
<node2 ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">
</node2>
</node1>
</root>

$ txn_tm=$( xmlstarlet sel -t -v '//node2/@TxnTm' file.xml )

$ echo "$txn_tm"
2019-03-27T10:41:13


If you want to select the node based on the ReqId, then we need to adjust the xpath: return the "TxnTm" attribute value for any node with the specified "ReqId" attribute.



xmlstarlet sel -t -v '//*[@ReqId = "XXXXX"]/@TxnTm' -n file.xml





share|improve this answer

























  • It's likely that they want to use ReqId in the selection.

    – Kusalananda
    2 days ago











  • Argh, not seen that was XML :)

    – Gilles Quenot
    2 days ago



















0














Don't use regular expressions to parse XML. That way lies madness. But if you insist on a descent into madness and ponies:



sed -En '/TxnTm=/s/^.*TxnTm="//;s/T[0-9:]+".*$//;p;q;' < inputfile





share|improve this answer

























  • well above command is printing all occurrences of date whereas I want to print it only once.

    – user313150
    2 days ago






  • 2





    @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

    – Kusalananda
    2 days ago






  • 1





    This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

    – DopeGhoti
    2 days ago











  • I have edited the command to stop at the first match.

    – DopeGhoti
    2 days ago











  • Thanks a lot ..

    – user313150
    2 days ago


















0














A simpler option using just grep, albeit again with the advisory that using regular expression tools to parse XML or XHTML is a one-way ticket to sadness-town:



$ grep -m1 -oE '"[0-9]4-[0-9]2-[0-9]2"' input
"2019-03-27"





share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f509455%2fusing-awk-to-parse-from-xml%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Making some assumptions about your data:



    $ cat file.xml
    <root>
    <node1>
    <node2 ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">
    </node2>
    </node1>
    </root>

    $ txn_tm=$( xmlstarlet sel -t -v '//node2/@TxnTm' file.xml )

    $ echo "$txn_tm"
    2019-03-27T10:41:13


    If you want to select the node based on the ReqId, then we need to adjust the xpath: return the "TxnTm" attribute value for any node with the specified "ReqId" attribute.



    xmlstarlet sel -t -v '//*[@ReqId = "XXXXX"]/@TxnTm' -n file.xml





    share|improve this answer

























    • It's likely that they want to use ReqId in the selection.

      – Kusalananda
      2 days ago











    • Argh, not seen that was XML :)

      – Gilles Quenot
      2 days ago
















    3














    Making some assumptions about your data:



    $ cat file.xml
    <root>
    <node1>
    <node2 ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">
    </node2>
    </node1>
    </root>

    $ txn_tm=$( xmlstarlet sel -t -v '//node2/@TxnTm' file.xml )

    $ echo "$txn_tm"
    2019-03-27T10:41:13


    If you want to select the node based on the ReqId, then we need to adjust the xpath: return the "TxnTm" attribute value for any node with the specified "ReqId" attribute.



    xmlstarlet sel -t -v '//*[@ReqId = "XXXXX"]/@TxnTm' -n file.xml





    share|improve this answer

























    • It's likely that they want to use ReqId in the selection.

      – Kusalananda
      2 days ago











    • Argh, not seen that was XML :)

      – Gilles Quenot
      2 days ago














    3












    3








    3







    Making some assumptions about your data:



    $ cat file.xml
    <root>
    <node1>
    <node2 ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">
    </node2>
    </node1>
    </root>

    $ txn_tm=$( xmlstarlet sel -t -v '//node2/@TxnTm' file.xml )

    $ echo "$txn_tm"
    2019-03-27T10:41:13


    If you want to select the node based on the ReqId, then we need to adjust the xpath: return the "TxnTm" attribute value for any node with the specified "ReqId" attribute.



    xmlstarlet sel -t -v '//*[@ReqId = "XXXXX"]/@TxnTm' -n file.xml





    share|improve this answer















    Making some assumptions about your data:



    $ cat file.xml
    <root>
    <node1>
    <node2 ReqId="XXXXX" TxnTyp="4" Actn="1" BizDt="2019-03-27" TxnTm="2019-03-27T10:41:13" AdjTyp="3" SetSesID="EOD">
    </node2>
    </node1>
    </root>

    $ txn_tm=$( xmlstarlet sel -t -v '//node2/@TxnTm' file.xml )

    $ echo "$txn_tm"
    2019-03-27T10:41:13


    If you want to select the node based on the ReqId, then we need to adjust the xpath: return the "TxnTm" attribute value for any node with the specified "ReqId" attribute.



    xmlstarlet sel -t -v '//*[@ReqId = "XXXXX"]/@TxnTm' -n file.xml






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago

























    answered 2 days ago









    glenn jackmanglenn jackman

    52.9k573114




    52.9k573114












    • It's likely that they want to use ReqId in the selection.

      – Kusalananda
      2 days ago











    • Argh, not seen that was XML :)

      – Gilles Quenot
      2 days ago


















    • It's likely that they want to use ReqId in the selection.

      – Kusalananda
      2 days ago











    • Argh, not seen that was XML :)

      – Gilles Quenot
      2 days ago

















    It's likely that they want to use ReqId in the selection.

    – Kusalananda
    2 days ago





    It's likely that they want to use ReqId in the selection.

    – Kusalananda
    2 days ago













    Argh, not seen that was XML :)

    – Gilles Quenot
    2 days ago






    Argh, not seen that was XML :)

    – Gilles Quenot
    2 days ago














    0














    Don't use regular expressions to parse XML. That way lies madness. But if you insist on a descent into madness and ponies:



    sed -En '/TxnTm=/s/^.*TxnTm="//;s/T[0-9:]+".*$//;p;q;' < inputfile





    share|improve this answer

























    • well above command is printing all occurrences of date whereas I want to print it only once.

      – user313150
      2 days ago






    • 2





      @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

      – Kusalananda
      2 days ago






    • 1





      This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

      – DopeGhoti
      2 days ago











    • I have edited the command to stop at the first match.

      – DopeGhoti
      2 days ago











    • Thanks a lot ..

      – user313150
      2 days ago















    0














    Don't use regular expressions to parse XML. That way lies madness. But if you insist on a descent into madness and ponies:



    sed -En '/TxnTm=/s/^.*TxnTm="//;s/T[0-9:]+".*$//;p;q;' < inputfile





    share|improve this answer

























    • well above command is printing all occurrences of date whereas I want to print it only once.

      – user313150
      2 days ago






    • 2





      @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

      – Kusalananda
      2 days ago






    • 1





      This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

      – DopeGhoti
      2 days ago











    • I have edited the command to stop at the first match.

      – DopeGhoti
      2 days ago











    • Thanks a lot ..

      – user313150
      2 days ago













    0












    0








    0







    Don't use regular expressions to parse XML. That way lies madness. But if you insist on a descent into madness and ponies:



    sed -En '/TxnTm=/s/^.*TxnTm="//;s/T[0-9:]+".*$//;p;q;' < inputfile





    share|improve this answer















    Don't use regular expressions to parse XML. That way lies madness. But if you insist on a descent into madness and ponies:



    sed -En '/TxnTm=/s/^.*TxnTm="//;s/T[0-9:]+".*$//;p;q;' < inputfile






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago

























    answered 2 days ago









    DopeGhotiDopeGhoti

    46.7k56190




    46.7k56190












    • well above command is printing all occurrences of date whereas I want to print it only once.

      – user313150
      2 days ago






    • 2





      @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

      – Kusalananda
      2 days ago






    • 1





      This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

      – DopeGhoti
      2 days ago











    • I have edited the command to stop at the first match.

      – DopeGhoti
      2 days ago











    • Thanks a lot ..

      – user313150
      2 days ago

















    • well above command is printing all occurrences of date whereas I want to print it only once.

      – user313150
      2 days ago






    • 2





      @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

      – Kusalananda
      2 days ago






    • 1





      This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

      – DopeGhoti
      2 days ago











    • I have edited the command to stop at the first match.

      – DopeGhoti
      2 days ago











    • Thanks a lot ..

      – user313150
      2 days ago
















    well above command is printing all occurrences of date whereas I want to print it only once.

    – user313150
    2 days ago





    well above command is printing all occurrences of date whereas I want to print it only once.

    – user313150
    2 days ago




    2




    2





    @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

    – Kusalananda
    2 days ago





    @user313150 Please update the question with a complete and well formed XML document. You only gave us a partial snippet. We have no way of knowing what the rest of the document looks like or if there are more date attributes elsewhere.

    – Kusalananda
    2 days ago




    1




    1





    This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

    – DopeGhoti
    2 days ago





    This works for the example input given. If that input was insufficient to advise the answer, this is a case of GIGO, and also a case of don't parse XML with regular expressions.

    – DopeGhoti
    2 days ago













    I have edited the command to stop at the first match.

    – DopeGhoti
    2 days ago





    I have edited the command to stop at the first match.

    – DopeGhoti
    2 days ago













    Thanks a lot ..

    – user313150
    2 days ago





    Thanks a lot ..

    – user313150
    2 days ago











    0














    A simpler option using just grep, albeit again with the advisory that using regular expression tools to parse XML or XHTML is a one-way ticket to sadness-town:



    $ grep -m1 -oE '"[0-9]4-[0-9]2-[0-9]2"' input
    "2019-03-27"





    share|improve this answer



























      0














      A simpler option using just grep, albeit again with the advisory that using regular expression tools to parse XML or XHTML is a one-way ticket to sadness-town:



      $ grep -m1 -oE '"[0-9]4-[0-9]2-[0-9]2"' input
      "2019-03-27"





      share|improve this answer

























        0












        0








        0







        A simpler option using just grep, albeit again with the advisory that using regular expression tools to parse XML or XHTML is a one-way ticket to sadness-town:



        $ grep -m1 -oE '"[0-9]4-[0-9]2-[0-9]2"' input
        "2019-03-27"





        share|improve this answer













        A simpler option using just grep, albeit again with the advisory that using regular expression tools to parse XML or XHTML is a one-way ticket to sadness-town:



        $ grep -m1 -oE '"[0-9]4-[0-9]2-[0-9]2"' input
        "2019-03-27"






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        DopeGhotiDopeGhoti

        46.7k56190




        46.7k56190



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f509455%2fusing-awk-to-parse-from-xml%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

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.