Community
    • Login

    All the off-topic go here

    Scheduled Pinned Locked Moved Boycott Notepad++
    3 Posts 3 Posters 302 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • donhoD
      donho
      last edited by

      As title.

      1 Reply Last reply Reply Quote 3
      • donhoD donho pinned this topic on
      • guy038G
        guy038
        last edited by guy038

        Hello, @jim-dailey and All,

        Jim, you said :

        Anyone who writes code would be well-served by at least a cursory familiarity with some version of AWK.

        I completely agree with this statement :-))


        BTW, The parentheses to surround the part FNR,$0 are not mandatory, at least with gawk v4.0.2. So :

        awk "{print FNR,$0}" snip.txt > nsnip.txt
        

        This version does NOT need any associated DLL and is ridiculously small : 156,174 bytes, although really very powerful !

        Best Regards,

        guy038

        P.S. :

        I used with an INPUT file of size 73,519 Ko, containing 444,810 lines with an average number of chars of 150 per line.

        And guess what : the OUTPUT file was created in 4,1 s, on my very old Win XP machine !

        Jim DaileyJ 1 Reply Last reply Reply Quote 0
        • Alan KilbornA Alan Kilborn referenced this topic on
        • Jim DaileyJ
          Jim Dailey @guy038
          last edited by

          Hello to you, @guy038. You said

          BTW, The parentheses to surround the part FNR,$0 are not mandatory, at least with gawk v4.0.2.

          You are correct, but I can’t bring myself not to use parenthesis with print() and printf(). But that’s just the start of my “non-standard” AWK behaviors. As an example, any substantial script I write will start thusly:

          BEGIN {exit}
          

          How’s that for non-standard?! :-)

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors