script trouble

Help
2006-03-20
2013-05-28
  • Jeff Higgins

    Jeff Higgins - 2006-03-20

    I've tried the following script
    but does not give expected results.

    NF { print;done_blank=0;next }
    !done_blank { $0 = ""; print; done_blank = 1 }

    for input:
    This is line 1.
    <space><tab><space>
    <blank>
    <blank>
    This is line 2.
    <blank>
    <space><tab><space>
    <blank>
    This is line 3.
    <blank>
    <blank>
    This is line 4.

    produces output:
    <space><tab><space>
    <blank>
    <blank>
    This is line 2.
    <blank>
    <space><tab><space>
    <blank>
    This is line 3.
    <blank>
    <blank>
    This is line 4.

    desired output:
    This is line 1.
    <blank>
    This is line 2.
    <blank>
    This is line 3.
    <blank>
    This is line 4.

    -- Jeff Higgins

     
    • ddaglas

      ddaglas - 2006-03-22

      0.13 addresses this bug.  See the release notes (http://sourceforge.net/project/shownotes.php?release_id=403614&group_id=53591) for more information.

      Thanks for the bug report!

       

Log in to post a comment.