in reply to Re^3: Merging two files and changing format
in thread Merging two files and changing format

your code is printing extra blank lines between lines of good output

sed -n '1, 5{=;p;}' test2

1

M MitoA10045G 0 10045 A A A A...

2

3

M MitoA10551G 0 10551 A A A A ...

4

5

M MitoA11252G 0 11252 A A A A ...

  • Comment on Re^4: Merging two files and changing format

Replies are listed 'Best First'.
Re^5: Merging two files and changing format
by choroba (Cardinal) on Oct 12, 2012 at 16:49 UTC
    This does not happen when I test it. Please, provide a sample of the input files in <code> ... </code> tags.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      M MitoA10045G 0 10045 M MitoA10551G 0 10551 M MitoA11252G 0 11252 M MitoA11468G 0 11468 M MitoA11813G 0 11813 M MitoA12309G 0 12309 M MitoA13106G 0 13106

      Each line of the following file corresponds with each line of the previous file

      AA AA AA AA AA AA ... AA AA AA AA AA AA ... AA AA AA AA AA AA ... AA AA AA AA AA AA ... AA AA AA AA AA AA ... AA AA AA AA AA AA... AA AA AA AA AA AA...
        I saved your files and ran my script. It complained about one file being shorter, so I adjusted that. The output has no blank lines anywhere.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ