• Login
Community
  • Login

All the off-topic go here

Scheduled Pinned Locked Moved Boycott Notepad++
3 Posts 3 Posters 440 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.
  • D
    donho
    last edited by Apr 21, 2025, 9:26 PM

    As title.

    1 Reply Last reply Reply Quote 3
    • D donho pinned this topic on Apr 21, 2025, 9:27 PM
    • G
      guy038
      last edited by guy038 May 1, 2025, 8:18 PM May 1, 2025, 4:12 PM

      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 !

      J 1 Reply Last reply May 1, 2025, 9:29 PM Reply Quote 0
      • A Alan Kilborn referenced this topic on May 1, 2025, 4:31 PM
      • J
        Jim Dailey @guy038
        last edited by May 1, 2025, 9:29 PM

        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
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors