How to merge two files as alternative lines?

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











up vote
2
down vote

favorite












I know how to merge two tables to print alternative lines in a new file, but I want to merge every two lines from file1.txt with one line from file2.txt. As an example:



file1.txt is



A a aa
B b bb
C c cc
D d dd


and file2.txt is



E e ee 
F f ff


I want to have



A a aa
B b bb
E e ee
C c cc
D d dd
F f ff









share|improve this question























  • you want the same order u mentioned?? A, B, E, C, D, F??
    – PRATAP
    Nov 25 at 7:00







  • 1




    What to do if lines amount in file1.txt smaller than amount in file2.txt ?
    – S_Flash
    Nov 25 at 8:27










  • Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
    – sudodus
    Nov 25 at 10:00










  • @PRATAP yes, I want the same order of my example.
    – Negar
    Nov 26 at 0:12















up vote
2
down vote

favorite












I know how to merge two tables to print alternative lines in a new file, but I want to merge every two lines from file1.txt with one line from file2.txt. As an example:



file1.txt is



A a aa
B b bb
C c cc
D d dd


and file2.txt is



E e ee 
F f ff


I want to have



A a aa
B b bb
E e ee
C c cc
D d dd
F f ff









share|improve this question























  • you want the same order u mentioned?? A, B, E, C, D, F??
    – PRATAP
    Nov 25 at 7:00







  • 1




    What to do if lines amount in file1.txt smaller than amount in file2.txt ?
    – S_Flash
    Nov 25 at 8:27










  • Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
    – sudodus
    Nov 25 at 10:00










  • @PRATAP yes, I want the same order of my example.
    – Negar
    Nov 26 at 0:12













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I know how to merge two tables to print alternative lines in a new file, but I want to merge every two lines from file1.txt with one line from file2.txt. As an example:



file1.txt is



A a aa
B b bb
C c cc
D d dd


and file2.txt is



E e ee 
F f ff


I want to have



A a aa
B b bb
E e ee
C c cc
D d dd
F f ff









share|improve this question















I know how to merge two tables to print alternative lines in a new file, but I want to merge every two lines from file1.txt with one line from file2.txt. As an example:



file1.txt is



A a aa
B b bb
C c cc
D d dd


and file2.txt is



E e ee 
F f ff


I want to have



A a aa
B b bb
E e ee
C c cc
D d dd
F f ff






text-processing merge






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 at 8:11









muru

134k19285484




134k19285484










asked Nov 25 at 6:56









Negar

163




163











  • you want the same order u mentioned?? A, B, E, C, D, F??
    – PRATAP
    Nov 25 at 7:00







  • 1




    What to do if lines amount in file1.txt smaller than amount in file2.txt ?
    – S_Flash
    Nov 25 at 8:27










  • Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
    – sudodus
    Nov 25 at 10:00










  • @PRATAP yes, I want the same order of my example.
    – Negar
    Nov 26 at 0:12

















  • you want the same order u mentioned?? A, B, E, C, D, F??
    – PRATAP
    Nov 25 at 7:00







  • 1




    What to do if lines amount in file1.txt smaller than amount in file2.txt ?
    – S_Flash
    Nov 25 at 8:27










  • Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
    – sudodus
    Nov 25 at 10:00










  • @PRATAP yes, I want the same order of my example.
    – Negar
    Nov 26 at 0:12
















you want the same order u mentioned?? A, B, E, C, D, F??
– PRATAP
Nov 25 at 7:00





you want the same order u mentioned?? A, B, E, C, D, F??
– PRATAP
Nov 25 at 7:00





1




1




What to do if lines amount in file1.txt smaller than amount in file2.txt ?
– S_Flash
Nov 25 at 8:27




What to do if lines amount in file1.txt smaller than amount in file2.txt ?
– S_Flash
Nov 25 at 8:27












Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
– sudodus
Nov 25 at 10:00




Please help us help you by answering our questions :-) It is best to answer our questions by editing your original question: "Edit 1: ...; Edit 2: ..."
– sudodus
Nov 25 at 10:00












@PRATAP yes, I want the same order of my example.
– Negar
Nov 26 at 0:12





@PRATAP yes, I want the same order of my example.
– Negar
Nov 26 at 0:12











3 Answers
3






active

oldest

votes

















up vote
7
down vote













Using GNU sed, you can read and insert one line from the second file after every other line ("two skip two") of the first:



$ sed '2~2R file2.txt' file1.txt
A a aa
B b bb
E e ee
C c cc
D d dd
F f ff



Slightly more long-winded implementation of the same in awk:



awk 'print !(NR%2) if ((getline < "file2.txt") > -1) print' file1.txt





share|improve this answer





























    up vote
    6
    down vote













    You can use the paste command for this:



    % paste -d 'n' - - file2.txt < file1.txt
    A a aa
    B b bb
    E e ee
    C c cc
    D d dd
    F f ff


    paste, by default, takes lines from each input file, then merges them into a single line separated by tabs. Using -d 'n', we tell it to use newlines as the separator instead. - is standard input, which is redirected in from file1.txt (< file1.txt). So paste takes one line from standard input, then another line from standard input (effectively two lines from file1.txt, then a line from file2.txt and prints them out separated by newlines.






    share|improve this answer




















    • It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
      – Negar
      Nov 25 at 8:39







    • 1




      Can you update your post with such an example?
      – muru
      Nov 25 at 8:55






    • 1




      @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
      – sudodus
      Nov 25 at 9:51











    • @Negar columns or rows? Again, please post a relevant example in your question.
      – muru
      Nov 26 at 0:23






    • 1




      @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
      – Negar
      Nov 26 at 2:52

















    up vote
    2
    down vote













    Original shellscript



    I thought the following script would do it. The trick is to open the two files on separate file descriptors (here #4 and #5).



    #!/bin/bash

    while read -r -u 4 line1 && read -r -u 4 line2 && read -r -u 5 line3
    do
    echo "$line1"
    echo "$line2"
    echo "$line3"
    done 4<file1.txt 5<file2.txt


    Test



    Make the script executable and run it,



    $ ./script 
    A a aa
    B b bb
    E e ee
    C c cc
    D d dd
    F f ff


    The original script stops, when reading to the end of file in one of the input files (so that only matching 2+1 lines are written to the output).



    Modified shellscript



    The following script will continue reading and writing until all the files have reached end of file (so that all available lines are written to the output). This should match what the OP wants.



    #!/bin/bash

    end1=false
    end2=false
    cont=true
    while $cont
    do
    read -r -u 4 line1
    if [ $? -eq 0 ]
    then
    echo "$line1"
    else
    end1=true
    fi

    read -r -u 4 line2
    if [ $? -eq 0 ]
    then
    echo "$line2"
    else
    end1=true
    fi

    read -r -u 5 line3
    if [ $? -eq 0 ]
    then
    echo "$line3"
    else
    end2=true
    fi

    if $end1 && $end2 # modify this line to change when to stop
    then
    cont=false
    fi
    done 4<file1.txt 5<file2.txt





    share|improve this answer






















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2faskubuntu.com%2fquestions%2f1095842%2fhow-to-merge-two-files-as-alternative-lines%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








      up vote
      7
      down vote













      Using GNU sed, you can read and insert one line from the second file after every other line ("two skip two") of the first:



      $ sed '2~2R file2.txt' file1.txt
      A a aa
      B b bb
      E e ee
      C c cc
      D d dd
      F f ff



      Slightly more long-winded implementation of the same in awk:



      awk 'print !(NR%2) if ((getline < "file2.txt") > -1) print' file1.txt





      share|improve this answer


























        up vote
        7
        down vote













        Using GNU sed, you can read and insert one line from the second file after every other line ("two skip two") of the first:



        $ sed '2~2R file2.txt' file1.txt
        A a aa
        B b bb
        E e ee
        C c cc
        D d dd
        F f ff



        Slightly more long-winded implementation of the same in awk:



        awk 'print !(NR%2) if ((getline < "file2.txt") > -1) print' file1.txt





        share|improve this answer
























          up vote
          7
          down vote










          up vote
          7
          down vote









          Using GNU sed, you can read and insert one line from the second file after every other line ("two skip two") of the first:



          $ sed '2~2R file2.txt' file1.txt
          A a aa
          B b bb
          E e ee
          C c cc
          D d dd
          F f ff



          Slightly more long-winded implementation of the same in awk:



          awk 'print !(NR%2) if ((getline < "file2.txt") > -1) print' file1.txt





          share|improve this answer














          Using GNU sed, you can read and insert one line from the second file after every other line ("two skip two") of the first:



          $ sed '2~2R file2.txt' file1.txt
          A a aa
          B b bb
          E e ee
          C c cc
          D d dd
          F f ff



          Slightly more long-winded implementation of the same in awk:



          awk 'print !(NR%2) if ((getline < "file2.txt") > -1) print' file1.txt






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 25 at 13:59

























          answered Nov 25 at 10:03









          steeldriver

          64.9k11103173




          64.9k11103173






















              up vote
              6
              down vote













              You can use the paste command for this:



              % paste -d 'n' - - file2.txt < file1.txt
              A a aa
              B b bb
              E e ee
              C c cc
              D d dd
              F f ff


              paste, by default, takes lines from each input file, then merges them into a single line separated by tabs. Using -d 'n', we tell it to use newlines as the separator instead. - is standard input, which is redirected in from file1.txt (< file1.txt). So paste takes one line from standard input, then another line from standard input (effectively two lines from file1.txt, then a line from file2.txt and prints them out separated by newlines.






              share|improve this answer




















              • It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
                – Negar
                Nov 25 at 8:39







              • 1




                Can you update your post with such an example?
                – muru
                Nov 25 at 8:55






              • 1




                @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
                – sudodus
                Nov 25 at 9:51











              • @Negar columns or rows? Again, please post a relevant example in your question.
                – muru
                Nov 26 at 0:23






              • 1




                @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
                – Negar
                Nov 26 at 2:52














              up vote
              6
              down vote













              You can use the paste command for this:



              % paste -d 'n' - - file2.txt < file1.txt
              A a aa
              B b bb
              E e ee
              C c cc
              D d dd
              F f ff


              paste, by default, takes lines from each input file, then merges them into a single line separated by tabs. Using -d 'n', we tell it to use newlines as the separator instead. - is standard input, which is redirected in from file1.txt (< file1.txt). So paste takes one line from standard input, then another line from standard input (effectively two lines from file1.txt, then a line from file2.txt and prints them out separated by newlines.






              share|improve this answer




















              • It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
                – Negar
                Nov 25 at 8:39







              • 1




                Can you update your post with such an example?
                – muru
                Nov 25 at 8:55






              • 1




                @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
                – sudodus
                Nov 25 at 9:51











              • @Negar columns or rows? Again, please post a relevant example in your question.
                – muru
                Nov 26 at 0:23






              • 1




                @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
                – Negar
                Nov 26 at 2:52












              up vote
              6
              down vote










              up vote
              6
              down vote









              You can use the paste command for this:



              % paste -d 'n' - - file2.txt < file1.txt
              A a aa
              B b bb
              E e ee
              C c cc
              D d dd
              F f ff


              paste, by default, takes lines from each input file, then merges them into a single line separated by tabs. Using -d 'n', we tell it to use newlines as the separator instead. - is standard input, which is redirected in from file1.txt (< file1.txt). So paste takes one line from standard input, then another line from standard input (effectively two lines from file1.txt, then a line from file2.txt and prints them out separated by newlines.






              share|improve this answer












              You can use the paste command for this:



              % paste -d 'n' - - file2.txt < file1.txt
              A a aa
              B b bb
              E e ee
              C c cc
              D d dd
              F f ff


              paste, by default, takes lines from each input file, then merges them into a single line separated by tabs. Using -d 'n', we tell it to use newlines as the separator instead. - is standard input, which is redirected in from file1.txt (< file1.txt). So paste takes one line from standard input, then another line from standard input (effectively two lines from file1.txt, then a line from file2.txt and prints them out separated by newlines.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 25 at 8:15









              muru

              134k19285484




              134k19285484











              • It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
                – Negar
                Nov 25 at 8:39







              • 1




                Can you update your post with such an example?
                – muru
                Nov 25 at 8:55






              • 1




                @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
                – sudodus
                Nov 25 at 9:51











              • @Negar columns or rows? Again, please post a relevant example in your question.
                – muru
                Nov 26 at 0:23






              • 1




                @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
                – Negar
                Nov 26 at 2:52
















              • It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
                – Negar
                Nov 25 at 8:39







              • 1




                Can you update your post with such an example?
                – muru
                Nov 25 at 8:55






              • 1




                @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
                – sudodus
                Nov 25 at 9:51











              • @Negar columns or rows? Again, please post a relevant example in your question.
                – muru
                Nov 26 at 0:23






              • 1




                @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
                – Negar
                Nov 26 at 2:52















              It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
              – Negar
              Nov 25 at 8:39





              It works! thanks. but, If two files have different number of columns, it prints blanket lines. how can I solve it?
              – Negar
              Nov 25 at 8:39





              1




              1




              Can you update your post with such an example?
              – muru
              Nov 25 at 8:55




              Can you update your post with such an example?
              – muru
              Nov 25 at 8:55




              1




              1




              @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
              – sudodus
              Nov 25 at 9:51





              @Negar, do you mean different number of columns or 'not matching number of lines'? And what action do you want in such cases (when the files do not match)?
              – sudodus
              Nov 25 at 9:51













              @Negar columns or rows? Again, please post a relevant example in your question.
              – muru
              Nov 26 at 0:23




              @Negar columns or rows? Again, please post a relevant example in your question.
              – muru
              Nov 26 at 0:23




              1




              1




              @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
              – Negar
              Nov 26 at 2:52




              @ sudodus Assume file1 has 30 rows and file2 has 10 rows. Then I want tho have a file including 40 rows. I want to have the first 20 rows alternatively plus final 20 rows of file1
              – Negar
              Nov 26 at 2:52










              up vote
              2
              down vote













              Original shellscript



              I thought the following script would do it. The trick is to open the two files on separate file descriptors (here #4 and #5).



              #!/bin/bash

              while read -r -u 4 line1 && read -r -u 4 line2 && read -r -u 5 line3
              do
              echo "$line1"
              echo "$line2"
              echo "$line3"
              done 4<file1.txt 5<file2.txt


              Test



              Make the script executable and run it,



              $ ./script 
              A a aa
              B b bb
              E e ee
              C c cc
              D d dd
              F f ff


              The original script stops, when reading to the end of file in one of the input files (so that only matching 2+1 lines are written to the output).



              Modified shellscript



              The following script will continue reading and writing until all the files have reached end of file (so that all available lines are written to the output). This should match what the OP wants.



              #!/bin/bash

              end1=false
              end2=false
              cont=true
              while $cont
              do
              read -r -u 4 line1
              if [ $? -eq 0 ]
              then
              echo "$line1"
              else
              end1=true
              fi

              read -r -u 4 line2
              if [ $? -eq 0 ]
              then
              echo "$line2"
              else
              end1=true
              fi

              read -r -u 5 line3
              if [ $? -eq 0 ]
              then
              echo "$line3"
              else
              end2=true
              fi

              if $end1 && $end2 # modify this line to change when to stop
              then
              cont=false
              fi
              done 4<file1.txt 5<file2.txt





              share|improve this answer


























                up vote
                2
                down vote













                Original shellscript



                I thought the following script would do it. The trick is to open the two files on separate file descriptors (here #4 and #5).



                #!/bin/bash

                while read -r -u 4 line1 && read -r -u 4 line2 && read -r -u 5 line3
                do
                echo "$line1"
                echo "$line2"
                echo "$line3"
                done 4<file1.txt 5<file2.txt


                Test



                Make the script executable and run it,



                $ ./script 
                A a aa
                B b bb
                E e ee
                C c cc
                D d dd
                F f ff


                The original script stops, when reading to the end of file in one of the input files (so that only matching 2+1 lines are written to the output).



                Modified shellscript



                The following script will continue reading and writing until all the files have reached end of file (so that all available lines are written to the output). This should match what the OP wants.



                #!/bin/bash

                end1=false
                end2=false
                cont=true
                while $cont
                do
                read -r -u 4 line1
                if [ $? -eq 0 ]
                then
                echo "$line1"
                else
                end1=true
                fi

                read -r -u 4 line2
                if [ $? -eq 0 ]
                then
                echo "$line2"
                else
                end1=true
                fi

                read -r -u 5 line3
                if [ $? -eq 0 ]
                then
                echo "$line3"
                else
                end2=true
                fi

                if $end1 && $end2 # modify this line to change when to stop
                then
                cont=false
                fi
                done 4<file1.txt 5<file2.txt





                share|improve this answer
























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  Original shellscript



                  I thought the following script would do it. The trick is to open the two files on separate file descriptors (here #4 and #5).



                  #!/bin/bash

                  while read -r -u 4 line1 && read -r -u 4 line2 && read -r -u 5 line3
                  do
                  echo "$line1"
                  echo "$line2"
                  echo "$line3"
                  done 4<file1.txt 5<file2.txt


                  Test



                  Make the script executable and run it,



                  $ ./script 
                  A a aa
                  B b bb
                  E e ee
                  C c cc
                  D d dd
                  F f ff


                  The original script stops, when reading to the end of file in one of the input files (so that only matching 2+1 lines are written to the output).



                  Modified shellscript



                  The following script will continue reading and writing until all the files have reached end of file (so that all available lines are written to the output). This should match what the OP wants.



                  #!/bin/bash

                  end1=false
                  end2=false
                  cont=true
                  while $cont
                  do
                  read -r -u 4 line1
                  if [ $? -eq 0 ]
                  then
                  echo "$line1"
                  else
                  end1=true
                  fi

                  read -r -u 4 line2
                  if [ $? -eq 0 ]
                  then
                  echo "$line2"
                  else
                  end1=true
                  fi

                  read -r -u 5 line3
                  if [ $? -eq 0 ]
                  then
                  echo "$line3"
                  else
                  end2=true
                  fi

                  if $end1 && $end2 # modify this line to change when to stop
                  then
                  cont=false
                  fi
                  done 4<file1.txt 5<file2.txt





                  share|improve this answer














                  Original shellscript



                  I thought the following script would do it. The trick is to open the two files on separate file descriptors (here #4 and #5).



                  #!/bin/bash

                  while read -r -u 4 line1 && read -r -u 4 line2 && read -r -u 5 line3
                  do
                  echo "$line1"
                  echo "$line2"
                  echo "$line3"
                  done 4<file1.txt 5<file2.txt


                  Test



                  Make the script executable and run it,



                  $ ./script 
                  A a aa
                  B b bb
                  E e ee
                  C c cc
                  D d dd
                  F f ff


                  The original script stops, when reading to the end of file in one of the input files (so that only matching 2+1 lines are written to the output).



                  Modified shellscript



                  The following script will continue reading and writing until all the files have reached end of file (so that all available lines are written to the output). This should match what the OP wants.



                  #!/bin/bash

                  end1=false
                  end2=false
                  cont=true
                  while $cont
                  do
                  read -r -u 4 line1
                  if [ $? -eq 0 ]
                  then
                  echo "$line1"
                  else
                  end1=true
                  fi

                  read -r -u 4 line2
                  if [ $? -eq 0 ]
                  then
                  echo "$line2"
                  else
                  end1=true
                  fi

                  read -r -u 5 line3
                  if [ $? -eq 0 ]
                  then
                  echo "$line3"
                  else
                  end2=true
                  fi

                  if $end1 && $end2 # modify this line to change when to stop
                  then
                  cont=false
                  fi
                  done 4<file1.txt 5<file2.txt






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 26 at 8:37

























                  answered Nov 25 at 8:03









                  sudodus

                  21.8k32871




                  21.8k32871



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2faskubuntu.com%2fquestions%2f1095842%2fhow-to-merge-two-files-as-alternative-lines%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

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?