How to use awk to split the row(record)?How to use awk or sed to convert csv diffs into more readable...

How do I subvert the tropes of a train heist?

Leading and Suffering Numbers

Uses of T extends U?

Scaffoldings in New York

How were these pictures of spacecraft wind tunnel testing taken?

Is it possible to change original filename of an exe?

I think I may have violated academic integrity last year - what should I do?

Is there an evolutionary advantage to having two heads?

Can't use numexpr in horizontal mode

How current works

What are the problems in teaching guitar via Skype?

Crossword gone overboard

Apparent Ring of Craters on the Moon

What is the 中 in ダウンロード中?

If a massive object like Jupiter flew past the Earth how close would it need to come to pull people off of the surface?

Is floating in space similar to falling under gravity?

What was this black-and-white film set in the Arctic or Antarctic where the monster/alien gets fried in the end?

Tic-Tac-Toe for the terminal

Split polygon using another polygon in QGIS

What does it mean when you think without speaking?

Where can I find the list of all tendons in the human body?

Looking after a wayward brother in mother's will

Could I be denied entry into Ireland due to medical and police situations during a previous UK visit?

What does the term “mohel” mean in Hilchot Melicha (salting)?



How to use awk to split the row(record)?


How to use awk or sed to convert csv diffs into more readable formatUse awk to split line into array and use that array's values in calling shellawk manipulationawk replace specific column in specific linehow to split multiline records by awk?Awk split and conditional printingHow to remove symbols from a column using awkParse file with Awk only when first row matches patternSimple variable set in awkawk manipulation of a file






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







0















File:



data
A B
C D
data
E F
G H
data
I J
K L
M N


Wanted result:



I J
K L
M N


How to split by "data"?
I have been search from google about how to use awk, But most of relative awk is split the column.










share|improve this question









New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • so you just need to rip off data right??

    – Goron
    43 mins ago


















0















File:



data
A B
C D
data
E F
G H
data
I J
K L
M N


Wanted result:



I J
K L
M N


How to split by "data"?
I have been search from google about how to use awk, But most of relative awk is split the column.










share|improve this question









New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • so you just need to rip off data right??

    – Goron
    43 mins ago














0












0








0








File:



data
A B
C D
data
E F
G H
data
I J
K L
M N


Wanted result:



I J
K L
M N


How to split by "data"?
I have been search from google about how to use awk, But most of relative awk is split the column.










share|improve this question









New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











File:



data
A B
C D
data
E F
G H
data
I J
K L
M N


Wanted result:



I J
K L
M N


How to split by "data"?
I have been search from google about how to use awk, But most of relative awk is split the column.







awk






share|improve this question









New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 8 mins ago









Prvt_Yadv

3,47831632




3,47831632






New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 53 mins ago









LeeLee

1




1




New contributor



Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • so you just need to rip off data right??

    – Goron
    43 mins ago



















  • so you just need to rip off data right??

    – Goron
    43 mins ago

















so you just need to rip off data right??

– Goron
43 mins ago





so you just need to rip off data right??

– Goron
43 mins ago










1 Answer
1






active

oldest

votes


















0














To use data as the record separator and print the last record:



$ awk -v RS=data 'END{print}' File

I J
K L
M N




share
























    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
    });


    }
    });






    Lee is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f521430%2fhow-to-use-awk-to-split-the-rowrecord%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









    0














    To use data as the record separator and print the last record:



    $ awk -v RS=data 'END{print}' File

    I J
    K L
    M N




    share




























      0














      To use data as the record separator and print the last record:



      $ awk -v RS=data 'END{print}' File

      I J
      K L
      M N




      share


























        0












        0








        0







        To use data as the record separator and print the last record:



        $ awk -v RS=data 'END{print}' File

        I J
        K L
        M N




        share













        To use data as the record separator and print the last record:



        $ awk -v RS=data 'END{print}' File

        I J
        K L
        M N





        share











        share


        share










        answered 1 min ago









        John1024John1024

        49.9k5116131




        49.9k5116131






















            Lee is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Lee is a new contributor. Be nice, and check out our Code of Conduct.













            Lee is a new contributor. Be nice, and check out our Code of Conduct.












            Lee is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f521430%2fhow-to-use-awk-to-split-the-rowrecord%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...