add new line after third comma

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












I have these long IDs which are consisted of four sections



AKJHGFGUIKL,OIUYT,KJHBTYUI,98765434567
RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL,6789876
ETRYTUUI,YTYUIL,UIOKJHGFGH,34567898766


I want to put the numbers in new line and remove the third comma.



AKJHGFGUIKL,OIUYT,KJHBTYUI
98765434567

RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL
6789876

ETRYTUUI,YTYUIL,UIOKJHGFGH
34567898766


how can I do this?










share|improve this question









New contributor




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























    up vote
    4
    down vote

    favorite












    I have these long IDs which are consisted of four sections



    AKJHGFGUIKL,OIUYT,KJHBTYUI,98765434567
    RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL,6789876
    ETRYTUUI,YTYUIL,UIOKJHGFGH,34567898766


    I want to put the numbers in new line and remove the third comma.



    AKJHGFGUIKL,OIUYT,KJHBTYUI
    98765434567

    RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL
    6789876

    ETRYTUUI,YTYUIL,UIOKJHGFGH
    34567898766


    how can I do this?










    share|improve this question









    New contributor




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





















      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      I have these long IDs which are consisted of four sections



      AKJHGFGUIKL,OIUYT,KJHBTYUI,98765434567
      RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL,6789876
      ETRYTUUI,YTYUIL,UIOKJHGFGH,34567898766


      I want to put the numbers in new line and remove the third comma.



      AKJHGFGUIKL,OIUYT,KJHBTYUI
      98765434567

      RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL
      6789876

      ETRYTUUI,YTYUIL,UIOKJHGFGH
      34567898766


      how can I do this?










      share|improve this question









      New contributor




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











      I have these long IDs which are consisted of four sections



      AKJHGFGUIKL,OIUYT,KJHBTYUI,98765434567
      RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL,6789876
      ETRYTUUI,YTYUIL,UIOKJHGFGH,34567898766


      I want to put the numbers in new line and remove the third comma.



      AKJHGFGUIKL,OIUYT,KJHBTYUI
      98765434567

      RTYUIKHGFGH,TYUJI,TGHYJKJKLJKL
      6789876

      ETRYTUUI,YTYUIL,UIOKJHGFGH
      34567898766


      how can I do this?







      text-processing csv






      share|improve this question









      New contributor




      Simon Q 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




      Simon Q 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 18 mins ago









      Kusalananda

      109k14211334




      109k14211334






      New contributor




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









      asked 50 mins ago









      Simon Q

      233




      233




      New contributor




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





      New contributor





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






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




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          Using GNU sed:



          sed "s/,/n/3; G" file

          ETRYTUUI,YTYUIL,UIOKJHGFGH
          34567898766





          share|improve this answer






















          • this is the shortest, love it thanks!
            – Simon Q
            27 mins ago

















          up vote
          4
          down vote













          awk -F, -vOFS=, 'print $1,$2,$3; print $4; print ""' file


          will produce your desired output






          share|improve this answer



























            up vote
            1
            down vote













            awk -F, 'print $1, $2, $3,"n"$4'





            share|improve this answer
















            • 1




              You'd need to set OFS=, as well in order to preserve the other delimiters
              – steeldriver
              42 mins ago










            • @steeldriver but it will not remove the third comma as requested?
              – TNT
              40 mins ago











            • ... then change the last part to a simple concatenation $3 "n" $4
              – steeldriver
              38 mins ago











            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            Simon Q 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%2f474882%2fadd-new-line-after-third-comma%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            Using GNU sed:



            sed "s/,/n/3; G" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer






















            • this is the shortest, love it thanks!
              – Simon Q
              27 mins ago














            up vote
            6
            down vote



            accepted










            Using GNU sed:



            sed "s/,/n/3; G" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer






















            • this is the shortest, love it thanks!
              – Simon Q
              27 mins ago












            up vote
            6
            down vote



            accepted







            up vote
            6
            down vote



            accepted






            Using GNU sed:



            sed "s/,/n/3; G" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer














            Using GNU sed:



            sed "s/,/n/3; G" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 17 mins ago









            Kusalananda

            109k14211334




            109k14211334










            answered 48 mins ago









            Goro

            8,47254283




            8,47254283











            • this is the shortest, love it thanks!
              – Simon Q
              27 mins ago
















            • this is the shortest, love it thanks!
              – Simon Q
              27 mins ago















            this is the shortest, love it thanks!
            – Simon Q
            27 mins ago




            this is the shortest, love it thanks!
            – Simon Q
            27 mins ago












            up vote
            4
            down vote













            awk -F, -vOFS=, 'print $1,$2,$3; print $4; print ""' file


            will produce your desired output






            share|improve this answer
























              up vote
              4
              down vote













              awk -F, -vOFS=, 'print $1,$2,$3; print $4; print ""' file


              will produce your desired output






              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                awk -F, -vOFS=, 'print $1,$2,$3; print $4; print ""' file


                will produce your desired output






                share|improve this answer












                awk -F, -vOFS=, 'print $1,$2,$3; print $4; print ""' file


                will produce your desired output







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 38 mins ago









                glenn jackman

                48.8k466105




                48.8k466105




















                    up vote
                    1
                    down vote













                    awk -F, 'print $1, $2, $3,"n"$4'





                    share|improve this answer
















                    • 1




                      You'd need to set OFS=, as well in order to preserve the other delimiters
                      – steeldriver
                      42 mins ago










                    • @steeldriver but it will not remove the third comma as requested?
                      – TNT
                      40 mins ago











                    • ... then change the last part to a simple concatenation $3 "n" $4
                      – steeldriver
                      38 mins ago















                    up vote
                    1
                    down vote













                    awk -F, 'print $1, $2, $3,"n"$4'





                    share|improve this answer
















                    • 1




                      You'd need to set OFS=, as well in order to preserve the other delimiters
                      – steeldriver
                      42 mins ago










                    • @steeldriver but it will not remove the third comma as requested?
                      – TNT
                      40 mins ago











                    • ... then change the last part to a simple concatenation $3 "n" $4
                      – steeldriver
                      38 mins ago













                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    awk -F, 'print $1, $2, $3,"n"$4'





                    share|improve this answer












                    awk -F, 'print $1, $2, $3,"n"$4'






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 46 mins ago









                    TNT

                    346313




                    346313







                    • 1




                      You'd need to set OFS=, as well in order to preserve the other delimiters
                      – steeldriver
                      42 mins ago










                    • @steeldriver but it will not remove the third comma as requested?
                      – TNT
                      40 mins ago











                    • ... then change the last part to a simple concatenation $3 "n" $4
                      – steeldriver
                      38 mins ago













                    • 1




                      You'd need to set OFS=, as well in order to preserve the other delimiters
                      – steeldriver
                      42 mins ago










                    • @steeldriver but it will not remove the third comma as requested?
                      – TNT
                      40 mins ago











                    • ... then change the last part to a simple concatenation $3 "n" $4
                      – steeldriver
                      38 mins ago








                    1




                    1




                    You'd need to set OFS=, as well in order to preserve the other delimiters
                    – steeldriver
                    42 mins ago




                    You'd need to set OFS=, as well in order to preserve the other delimiters
                    – steeldriver
                    42 mins ago












                    @steeldriver but it will not remove the third comma as requested?
                    – TNT
                    40 mins ago





                    @steeldriver but it will not remove the third comma as requested?
                    – TNT
                    40 mins ago













                    ... then change the last part to a simple concatenation $3 "n" $4
                    – steeldriver
                    38 mins ago





                    ... then change the last part to a simple concatenation $3 "n" $4
                    – steeldriver
                    38 mins ago











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









                     

                    draft saved


                    draft discarded


















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












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











                    Simon Q 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%2f474882%2fadd-new-line-after-third-comma%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery