Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. I wrote an ebook on GNU awk with hundreds of examples and exercises

I wrote an ebook on GNU awk with hundreds of examples and exercises

Scheduled Pinned Locked Moved Linux
linux
22 Posts 19 Posters 0 Views
  • 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.
  • C [email protected]

    I'm not expert in sed or awk. I always have to Google. For me though, it's generally that you can do a great deal in just one line of awk or sed. They're standard on any Linux distribution I've ever used. When building out pipelines, scripts that you want run from an installer you built post install and when removing, sed and awk rather than needing python.

    All really nice when you have strict configuration management and versioning and there's something deployed but it doesn't have the python packages installed that would make it easy in python and you can't just pip install it on hundreds+ of computers without going through a process of approval and building a new tagged version release but sed/awk/etc can do the job. If it's hard enough, python and whatever packages you can install. If simple enough to do in a small bash script, no python just what's standard in your Linux distro

    N This user is from outside of this forum
    N This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #13

    I'm not expert in sed or awk. I always have to Google. For me though, it's generally that you can do a great deal in just one line of awk or sed.

    Same here ! I recently used a one liner awk piped into sed, piped into another command to find duplicated lines and merge both files.

    Writing a python script would have taken an unknown amount of time !

    1 Reply Last reply
    0
    • learnbyexample@programming.devL [email protected]

      Hello!

      I am pleased to announce a new version of my CLI text processing with GNU awk ebook. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.

      Book links

      To celebrate the new release, you can download the PDF/EPUB versions for free till 06-April-2025.

      • https://learnbyexample.gumroad.com/l/gnu_awk
      • https://leanpub.com/gnu_awk/c/free

      Or, you can read it online at https://learnbyexample.github.io/learn_gnuawk/

      Interactive TUI apps

      • 80+ exercises: https://github.com/learnbyexample/TUI-apps/blob/main/AwkExercises
      • Brief tutorial: https://github.com/learnbyexample/TUI-apps/blob/main/AwkTutorial

      Feedback

      I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on.

      Happy learning 🙂

      H This user is from outside of this forum
      H This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #14

      Perfect. I'm feeling comfortable enough with bash that next on my list is AWK. Gonna download this when I get home!

      D 1 Reply Last reply
      0
      • learnbyexample@programming.devL [email protected]

        Hello!

        I am pleased to announce a new version of my CLI text processing with GNU awk ebook. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.

        Book links

        To celebrate the new release, you can download the PDF/EPUB versions for free till 06-April-2025.

        • https://learnbyexample.gumroad.com/l/gnu_awk
        • https://leanpub.com/gnu_awk/c/free

        Or, you can read it online at https://learnbyexample.github.io/learn_gnuawk/

        Interactive TUI apps

        • 80+ exercises: https://github.com/learnbyexample/TUI-apps/blob/main/AwkExercises
        • Brief tutorial: https://github.com/learnbyexample/TUI-apps/blob/main/AwkTutorial

        Feedback

        I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on.

        Happy learning 🙂

        T This user is from outside of this forum
        T This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #15

        Looking forward to reading it! awk has been a huge blind spot for me for a long time now.

        1 Reply Last reply
        0
        • learnbyexample@programming.devL [email protected]

          Hello!

          I am pleased to announce a new version of my CLI text processing with GNU awk ebook. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.

          Book links

          To celebrate the new release, you can download the PDF/EPUB versions for free till 06-April-2025.

          • https://learnbyexample.gumroad.com/l/gnu_awk
          • https://leanpub.com/gnu_awk/c/free

          Or, you can read it online at https://learnbyexample.github.io/learn_gnuawk/

          Interactive TUI apps

          • 80+ exercises: https://github.com/learnbyexample/TUI-apps/blob/main/AwkExercises
          • Brief tutorial: https://github.com/learnbyexample/TUI-apps/blob/main/AwkTutorial

          Feedback

          I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on.

          Happy learning 🙂

          jagged_circle@feddit.nlJ This user is from outside of this forum
          jagged_circle@feddit.nlJ This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #16

          Thanks but omg no. I'm happy to use awk like cut.

          1 Reply Last reply
          0
          • E [email protected]

            i'm in awe everytime people do this.

            i learned how to do this before code sharing sites like github existed and it forced me to turn everything i've learned into muscle memory and i think that this next generation of greybeards are going to be so much better than my generation's greybeards because of it.

            V This user is from outside of this forum
            V This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #17

            I thought your comment was going in a totally different direction, it's nice to hear appreciation of improved teaching methods instead of the old "well I figured it out myself so everyone else should too"

            1 Reply Last reply
            0
            • learnbyexample@programming.devL [email protected]

              Hello!

              I am pleased to announce a new version of my CLI text processing with GNU awk ebook. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.

              Book links

              To celebrate the new release, you can download the PDF/EPUB versions for free till 06-April-2025.

              • https://learnbyexample.gumroad.com/l/gnu_awk
              • https://leanpub.com/gnu_awk/c/free

              Or, you can read it online at https://learnbyexample.github.io/learn_gnuawk/

              Interactive TUI apps

              • 80+ exercises: https://github.com/learnbyexample/TUI-apps/blob/main/AwkExercises
              • Brief tutorial: https://github.com/learnbyexample/TUI-apps/blob/main/AwkTutorial

              Feedback

              I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on.

              Happy learning 🙂

              M This user is from outside of this forum
              M This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #18

              Btw, there's asciidoctor-epub3.

              1 Reply Last reply
              0
              • H [email protected]

                Perfect. I'm feeling comfortable enough with bash that next on my list is AWK. Gonna download this when I get home!

                D This user is from outside of this forum
                D This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #19

                You misstyped fish.

                H 1 Reply Last reply
                0
                • D [email protected]

                  You misstyped fish.

                  H This user is from outside of this forum
                  H This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #20

                  Heh. I haven't started exploring other shells yet.

                  1 Reply Last reply
                  0
                  • learnbyexample@programming.devL [email protected]

                    Hello!

                    I am pleased to announce a new version of my CLI text processing with GNU awk ebook. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.

                    Book links

                    To celebrate the new release, you can download the PDF/EPUB versions for free till 06-April-2025.

                    • https://learnbyexample.gumroad.com/l/gnu_awk
                    • https://leanpub.com/gnu_awk/c/free

                    Or, you can read it online at https://learnbyexample.github.io/learn_gnuawk/

                    Interactive TUI apps

                    • 80+ exercises: https://github.com/learnbyexample/TUI-apps/blob/main/AwkExercises
                    • Brief tutorial: https://github.com/learnbyexample/TUI-apps/blob/main/AwkTutorial

                    Feedback

                    I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on.

                    Happy learning 🙂

                    S This user is from outside of this forum
                    S This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #21

                    Could you do grep next?

                    learnbyexample@programming.devL 1 Reply Last reply
                    0
                    • S [email protected]

                      Could you do grep next?

                      learnbyexample@programming.devL This user is from outside of this forum
                      learnbyexample@programming.devL This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #22

                      Already done grep, sed, coreutils, cli basics and more. See https://learnbyexample.github.io/learn_gnuawk/buy.html#book-list for links.

                      1 Reply Last reply
                      0
                      • System shared this topic on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups