Summing rows in a new column using sed, awk and perl?

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











up vote
3
down vote

favorite












I have a file that contain numbers something like:



1 11 323
2 13 3
3 44 4
4 66 23
5 70 23
6 34 23
7 24 22
8 27 5


How can I sum the rows and output the results in a column, so the results are as follows:



1 11 323 335
2 13 3 18
3 44 4 51
4 66 23 93
5 70 23 98
6 34 23 63
7 24 22 53
8 27 5 40


I would like to see solutions in sed, awk, and perl










share|improve this question









New contributor




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























    up vote
    3
    down vote

    favorite












    I have a file that contain numbers something like:



    1 11 323
    2 13 3
    3 44 4
    4 66 23
    5 70 23
    6 34 23
    7 24 22
    8 27 5


    How can I sum the rows and output the results in a column, so the results are as follows:



    1 11 323 335
    2 13 3 18
    3 44 4 51
    4 66 23 93
    5 70 23 98
    6 34 23 63
    7 24 22 53
    8 27 5 40


    I would like to see solutions in sed, awk, and perl










    share|improve this question









    New contributor




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





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I have a file that contain numbers something like:



      1 11 323
      2 13 3
      3 44 4
      4 66 23
      5 70 23
      6 34 23
      7 24 22
      8 27 5


      How can I sum the rows and output the results in a column, so the results are as follows:



      1 11 323 335
      2 13 3 18
      3 44 4 51
      4 66 23 93
      5 70 23 98
      6 34 23 63
      7 24 22 53
      8 27 5 40


      I would like to see solutions in sed, awk, and perl










      share|improve this question









      New contributor




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











      I have a file that contain numbers something like:



      1 11 323
      2 13 3
      3 44 4
      4 66 23
      5 70 23
      6 34 23
      7 24 22
      8 27 5


      How can I sum the rows and output the results in a column, so the results are as follows:



      1 11 323 335
      2 13 3 18
      3 44 4 51
      4 66 23 93
      5 70 23 98
      6 34 23 63
      7 24 22 53
      8 27 5 40


      I would like to see solutions in sed, awk, and perl







      bash awk sed perl






      share|improve this question









      New contributor




      Shervan 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




      Shervan 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 57 mins ago









      Goro

      3,01441951




      3,01441951






      New contributor




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









      asked 58 mins ago









      Shervan

      485




      485




      New contributor




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





      New contributor





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






      Shervan 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
          1
          down vote



          accepted










          Let's say that your data is saved in a file called data.txt.



          cat data.txt
          1 11 323
          2 13 3
          3 44 4
          4 66 23
          5 70 23
          6 34 23
          7 24 22
          8 27 5


          You can do it in awk as follows:



          awk 'X=$0split(X,x)print X , x[1]+x[2]+x[3]' data.txt
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          Or, per @RudiC's comment:



          awk 'print $0, $1+$2+$3' data.txt





          share|improve this answer


















          • 2




            Why not awk 'print $0, $1+$2+$3' file?
            – RudiC
            25 mins ago










          • how can I do it in sed pelae?
            – Shervan
            24 mins ago






          • 2




            sed is a (stream) editor, not a calculator.
            – RudiC
            23 mins ago

















          up vote
          2
          down vote













          Perl solution:



          perl -MList::Util=sum -lane 'print "@F ", sum(@F)' < data.txt



          • -n reads the input line by line


          • -l removes newlines from input and adds them to output


          • -a splits each input line on whitespace into the @F array


          • List::Util provides the sum function so you don't have to sum the numbers yourself

          In sed, arithmetic is nearly impossible to implement, but you can use sed to turn spaces into pluses and use that as a source for bc to get the sums, and paste the results with the input:



          paste -d ' ' data.txt <(sed -r 's/ /+/g' data.txt | bc)





          share|improve this answer






















          • sed is not working. I get this message "Missing name for redirect."
            – Shervan
            26 mins ago










          • @Shervan Are you sure you're using bash?
            – Kusalananda
            13 mins ago










          • yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
            – Shervan
            6 mins ago

















          up vote
          1
          down vote













          For an arbitrary number of columns, using awk:



          $ awk ' sum = 0; for (i = 1; i <= NF; i++) sum += $i; $(NF + 1) = sum 1' <file
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          NF is the number of fields (whitespace separated columns by default) in the current record (line by default). By calculating sum in a loop and setting $(NF + 1) to the total, we add a new column at the end. This new column is printed along with the others by the lone 1 at the end of the awk script (this may be replaced by print ).




          sed is not really suited for doing any form of arithmetics.





          share




















          • Thank you! please how can I do it in sed?
            – Shervan
            5 mins ago










          • @Shervan You can't. sed does not support arithmetic operations.
            – Kusalananda
            4 mins ago










          • @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
            – Kusalananda
            1 min 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
          );



          );






          Shervan 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%2f470041%2fsumming-rows-in-a-new-column-using-sed-awk-and-perl%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
          1
          down vote



          accepted










          Let's say that your data is saved in a file called data.txt.



          cat data.txt
          1 11 323
          2 13 3
          3 44 4
          4 66 23
          5 70 23
          6 34 23
          7 24 22
          8 27 5


          You can do it in awk as follows:



          awk 'X=$0split(X,x)print X , x[1]+x[2]+x[3]' data.txt
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          Or, per @RudiC's comment:



          awk 'print $0, $1+$2+$3' data.txt





          share|improve this answer


















          • 2




            Why not awk 'print $0, $1+$2+$3' file?
            – RudiC
            25 mins ago










          • how can I do it in sed pelae?
            – Shervan
            24 mins ago






          • 2




            sed is a (stream) editor, not a calculator.
            – RudiC
            23 mins ago














          up vote
          1
          down vote



          accepted










          Let's say that your data is saved in a file called data.txt.



          cat data.txt
          1 11 323
          2 13 3
          3 44 4
          4 66 23
          5 70 23
          6 34 23
          7 24 22
          8 27 5


          You can do it in awk as follows:



          awk 'X=$0split(X,x)print X , x[1]+x[2]+x[3]' data.txt
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          Or, per @RudiC's comment:



          awk 'print $0, $1+$2+$3' data.txt





          share|improve this answer


















          • 2




            Why not awk 'print $0, $1+$2+$3' file?
            – RudiC
            25 mins ago










          • how can I do it in sed pelae?
            – Shervan
            24 mins ago






          • 2




            sed is a (stream) editor, not a calculator.
            – RudiC
            23 mins ago












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Let's say that your data is saved in a file called data.txt.



          cat data.txt
          1 11 323
          2 13 3
          3 44 4
          4 66 23
          5 70 23
          6 34 23
          7 24 22
          8 27 5


          You can do it in awk as follows:



          awk 'X=$0split(X,x)print X , x[1]+x[2]+x[3]' data.txt
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          Or, per @RudiC's comment:



          awk 'print $0, $1+$2+$3' data.txt





          share|improve this answer














          Let's say that your data is saved in a file called data.txt.



          cat data.txt
          1 11 323
          2 13 3
          3 44 4
          4 66 23
          5 70 23
          6 34 23
          7 24 22
          8 27 5


          You can do it in awk as follows:



          awk 'X=$0split(X,x)print X , x[1]+x[2]+x[3]' data.txt
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          Or, per @RudiC's comment:



          awk 'print $0, $1+$2+$3' data.txt






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 22 mins ago

























          answered 53 mins ago









          Goro

          3,01441951




          3,01441951







          • 2




            Why not awk 'print $0, $1+$2+$3' file?
            – RudiC
            25 mins ago










          • how can I do it in sed pelae?
            – Shervan
            24 mins ago






          • 2




            sed is a (stream) editor, not a calculator.
            – RudiC
            23 mins ago












          • 2




            Why not awk 'print $0, $1+$2+$3' file?
            – RudiC
            25 mins ago










          • how can I do it in sed pelae?
            – Shervan
            24 mins ago






          • 2




            sed is a (stream) editor, not a calculator.
            – RudiC
            23 mins ago







          2




          2




          Why not awk 'print $0, $1+$2+$3' file?
          – RudiC
          25 mins ago




          Why not awk 'print $0, $1+$2+$3' file?
          – RudiC
          25 mins ago












          how can I do it in sed pelae?
          – Shervan
          24 mins ago




          how can I do it in sed pelae?
          – Shervan
          24 mins ago




          2




          2




          sed is a (stream) editor, not a calculator.
          – RudiC
          23 mins ago




          sed is a (stream) editor, not a calculator.
          – RudiC
          23 mins ago












          up vote
          2
          down vote













          Perl solution:



          perl -MList::Util=sum -lane 'print "@F ", sum(@F)' < data.txt



          • -n reads the input line by line


          • -l removes newlines from input and adds them to output


          • -a splits each input line on whitespace into the @F array


          • List::Util provides the sum function so you don't have to sum the numbers yourself

          In sed, arithmetic is nearly impossible to implement, but you can use sed to turn spaces into pluses and use that as a source for bc to get the sums, and paste the results with the input:



          paste -d ' ' data.txt <(sed -r 's/ /+/g' data.txt | bc)





          share|improve this answer






















          • sed is not working. I get this message "Missing name for redirect."
            – Shervan
            26 mins ago










          • @Shervan Are you sure you're using bash?
            – Kusalananda
            13 mins ago










          • yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
            – Shervan
            6 mins ago














          up vote
          2
          down vote













          Perl solution:



          perl -MList::Util=sum -lane 'print "@F ", sum(@F)' < data.txt



          • -n reads the input line by line


          • -l removes newlines from input and adds them to output


          • -a splits each input line on whitespace into the @F array


          • List::Util provides the sum function so you don't have to sum the numbers yourself

          In sed, arithmetic is nearly impossible to implement, but you can use sed to turn spaces into pluses and use that as a source for bc to get the sums, and paste the results with the input:



          paste -d ' ' data.txt <(sed -r 's/ /+/g' data.txt | bc)





          share|improve this answer






















          • sed is not working. I get this message "Missing name for redirect."
            – Shervan
            26 mins ago










          • @Shervan Are you sure you're using bash?
            – Kusalananda
            13 mins ago










          • yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
            – Shervan
            6 mins ago












          up vote
          2
          down vote










          up vote
          2
          down vote









          Perl solution:



          perl -MList::Util=sum -lane 'print "@F ", sum(@F)' < data.txt



          • -n reads the input line by line


          • -l removes newlines from input and adds them to output


          • -a splits each input line on whitespace into the @F array


          • List::Util provides the sum function so you don't have to sum the numbers yourself

          In sed, arithmetic is nearly impossible to implement, but you can use sed to turn spaces into pluses and use that as a source for bc to get the sums, and paste the results with the input:



          paste -d ' ' data.txt <(sed -r 's/ /+/g' data.txt | bc)





          share|improve this answer














          Perl solution:



          perl -MList::Util=sum -lane 'print "@F ", sum(@F)' < data.txt



          • -n reads the input line by line


          • -l removes newlines from input and adds them to output


          • -a splits each input line on whitespace into the @F array


          • List::Util provides the sum function so you don't have to sum the numbers yourself

          In sed, arithmetic is nearly impossible to implement, but you can use sed to turn spaces into pluses and use that as a source for bc to get the sums, and paste the results with the input:



          paste -d ' ' data.txt <(sed -r 's/ /+/g' data.txt | bc)






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 46 mins ago

























          answered 52 mins ago









          choroba

          24.6k34168




          24.6k34168











          • sed is not working. I get this message "Missing name for redirect."
            – Shervan
            26 mins ago










          • @Shervan Are you sure you're using bash?
            – Kusalananda
            13 mins ago










          • yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
            – Shervan
            6 mins ago
















          • sed is not working. I get this message "Missing name for redirect."
            – Shervan
            26 mins ago










          • @Shervan Are you sure you're using bash?
            – Kusalananda
            13 mins ago










          • yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
            – Shervan
            6 mins ago















          sed is not working. I get this message "Missing name for redirect."
          – Shervan
          26 mins ago




          sed is not working. I get this message "Missing name for redirect."
          – Shervan
          26 mins ago












          @Shervan Are you sure you're using bash?
          – Kusalananda
          13 mins ago




          @Shervan Are you sure you're using bash?
          – Kusalananda
          13 mins ago












          yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
          – Shervan
          6 mins ago




          yes! bash --version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
          – Shervan
          6 mins ago










          up vote
          1
          down vote













          For an arbitrary number of columns, using awk:



          $ awk ' sum = 0; for (i = 1; i <= NF; i++) sum += $i; $(NF + 1) = sum 1' <file
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          NF is the number of fields (whitespace separated columns by default) in the current record (line by default). By calculating sum in a loop and setting $(NF + 1) to the total, we add a new column at the end. This new column is printed along with the others by the lone 1 at the end of the awk script (this may be replaced by print ).




          sed is not really suited for doing any form of arithmetics.





          share




















          • Thank you! please how can I do it in sed?
            – Shervan
            5 mins ago










          • @Shervan You can't. sed does not support arithmetic operations.
            – Kusalananda
            4 mins ago










          • @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
            – Kusalananda
            1 min ago














          up vote
          1
          down vote













          For an arbitrary number of columns, using awk:



          $ awk ' sum = 0; for (i = 1; i <= NF; i++) sum += $i; $(NF + 1) = sum 1' <file
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          NF is the number of fields (whitespace separated columns by default) in the current record (line by default). By calculating sum in a loop and setting $(NF + 1) to the total, we add a new column at the end. This new column is printed along with the others by the lone 1 at the end of the awk script (this may be replaced by print ).




          sed is not really suited for doing any form of arithmetics.





          share




















          • Thank you! please how can I do it in sed?
            – Shervan
            5 mins ago










          • @Shervan You can't. sed does not support arithmetic operations.
            – Kusalananda
            4 mins ago










          • @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
            – Kusalananda
            1 min ago












          up vote
          1
          down vote










          up vote
          1
          down vote









          For an arbitrary number of columns, using awk:



          $ awk ' sum = 0; for (i = 1; i <= NF; i++) sum += $i; $(NF + 1) = sum 1' <file
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          NF is the number of fields (whitespace separated columns by default) in the current record (line by default). By calculating sum in a loop and setting $(NF + 1) to the total, we add a new column at the end. This new column is printed along with the others by the lone 1 at the end of the awk script (this may be replaced by print ).




          sed is not really suited for doing any form of arithmetics.





          share












          For an arbitrary number of columns, using awk:



          $ awk ' sum = 0; for (i = 1; i <= NF; i++) sum += $i; $(NF + 1) = sum 1' <file
          1 11 323 335
          2 13 3 18
          3 44 4 51
          4 66 23 93
          5 70 23 98
          6 34 23 63
          7 24 22 53
          8 27 5 40


          NF is the number of fields (whitespace separated columns by default) in the current record (line by default). By calculating sum in a loop and setting $(NF + 1) to the total, we add a new column at the end. This new column is printed along with the others by the lone 1 at the end of the awk script (this may be replaced by print ).




          sed is not really suited for doing any form of arithmetics.






          share











          share


          share










          answered 6 mins ago









          Kusalananda

          106k14209328




          106k14209328











          • Thank you! please how can I do it in sed?
            – Shervan
            5 mins ago










          • @Shervan You can't. sed does not support arithmetic operations.
            – Kusalananda
            4 mins ago










          • @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
            – Kusalananda
            1 min ago
















          • Thank you! please how can I do it in sed?
            – Shervan
            5 mins ago










          • @Shervan You can't. sed does not support arithmetic operations.
            – Kusalananda
            4 mins ago










          • @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
            – Kusalananda
            1 min ago















          Thank you! please how can I do it in sed?
          – Shervan
          5 mins ago




          Thank you! please how can I do it in sed?
          – Shervan
          5 mins ago












          @Shervan You can't. sed does not support arithmetic operations.
          – Kusalananda
          4 mins ago




          @Shervan You can't. sed does not support arithmetic operations.
          – Kusalananda
          4 mins ago












          @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
          – Kusalananda
          1 min ago




          @Shervan And when I say "you can't", I mean that you can, but it would be extremely difficult as you would have to do so with the aid of regular expressions and the other text manipulating facilities that sed provides. It would be as difficult to do with sed as with an ordinary plain text editor that does not support arithmetic operations natively.
          – Kusalananda
          1 min ago










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









           

          draft saved


          draft discarded


















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












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











          Shervan 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%2f470041%2fsumming-rows-in-a-new-column-using-sed-awk-and-perl%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