add new line after fourth comma

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











up vote
2
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
    2
    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
      2
      down vote

      favorite









      up vote
      2
      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 4 mins ago









      Jeff Schaller

      33.8k851113




      33.8k851113






      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 17 mins ago









      Simon Q

      111




      111




      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
          3
          down vote













          sed "s/,/n/3" file

          ETRYTUUI,YTYUIL,UIOKJHGFGH
          34567898766





          share|improve this answer




















          • ... sed "s/,/n/3; G" to add the double spacing
            – steeldriver
            1 min ago

















          up vote
          1
          down vote













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





          share|improve this answer




















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










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











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


















          up vote
          1
          down vote













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


          will produce your desired output





          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',
            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-fourth-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
            3
            down vote













            sed "s/,/n/3" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer




















            • ... sed "s/,/n/3; G" to add the double spacing
              – steeldriver
              1 min ago














            up vote
            3
            down vote













            sed "s/,/n/3" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer




















            • ... sed "s/,/n/3; G" to add the double spacing
              – steeldriver
              1 min ago












            up vote
            3
            down vote










            up vote
            3
            down vote









            sed "s/,/n/3" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766





            share|improve this answer












            sed "s/,/n/3" file

            ETRYTUUI,YTYUIL,UIOKJHGFGH
            34567898766






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 15 mins ago









            Goro

            8,45754283




            8,45754283











            • ... sed "s/,/n/3; G" to add the double spacing
              – steeldriver
              1 min ago
















            • ... sed "s/,/n/3; G" to add the double spacing
              – steeldriver
              1 min ago















            ... sed "s/,/n/3; G" to add the double spacing
            – steeldriver
            1 min ago




            ... sed "s/,/n/3; G" to add the double spacing
            – steeldriver
            1 min ago












            up vote
            1
            down vote













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





            share|improve this answer




















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










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











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















            up vote
            1
            down vote













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





            share|improve this answer




















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










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











            • ... then change the last part to a simple concatenation $3 "n" $4
              – steeldriver
              5 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 13 mins ago









            TNT

            346313




            346313











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










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











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

















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










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











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
















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




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












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





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













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





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











            up vote
            1
            down vote













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


            will produce your desired output





            share
























              up vote
              1
              down vote













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


              will produce your desired output





              share






















                up vote
                1
                down vote










                up vote
                1
                down vote









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


                will produce your desired output





                share












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


                will produce your desired output






                share











                share


                share










                answered 5 mins ago









                glenn jackman

                48.7k466105




                48.7k466105




















                    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-fourth-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

                    What does second last employer means? [closed]

                    One-line joke