• caseyweederman@lemmy.ca
    link
    fedilink
    arrow-up
    2
    ·
    13 hours ago

    Yeah but I keep trying to pipe the output back into the original file which ends up empty due to how pipe and redirect interact.
    I know there must be a grown-up way to do it but I inevitably resort to writing it to filename2 and then running mv filename2 filename.

  • AnUnusualRelic@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    1 day ago

    When I first learned Unix (and then Linux) I just went through /usr/bin and looked at the man page for everything.

    Then I browsed through the gnu info pages for bash.

    There’s no real alternative to RTFM.

  • BananaTrifleViolin@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 days ago

    This was a new one for me and I’ve been playing with linux for years. Also really enjoyed her video style so delved into some others.

    Thanks for sharing!

  • GhostlyPixel@lemmy.world
    link
    fedilink
    English
    arrow-up
    31
    ·
    2 days ago

    Really cool tool

    Her mentions of awk reminded me of a guy at my last job who was an absolute god with awk, but making changes to scripts he made were a nightmare because no one else could figure out what he was doing, and everything crashed and burned from small changes.

    • shastaxc@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Awk is ok but often when I come across a script that I need to optimize because it’s too slow, the easiest gains come from replacing awk command. Most of them use awk for the most mundane stuff that can easily be done with shell parameter expansion instead.

    • mesamune@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      28
      ·
      edit-2
      2 days ago

      Sometimes a small python script that is readable is better for long term support.

      • QuazarOmega@lemy.lol
        link
        fedilink
        arrow-up
        12
        arrow-down
        5
        ·
        2 days ago

        Sometimes

        Always*
        Shell scripting for serious tasks should crash and burn, wherever possible at least

        • LiveLM@lemmy.zip
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          9
          ·
          edit-2
          2 days ago

          For all that I shit talk Microsoft, Powershell does seem better suited for production tasks than bash and friends…

          • QuazarOmega@lemy.lol
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            2 days ago

            Absolutely, the syntax and API isn’t exactly easy, but it is miles better because it’s both more familiar to other programming languages and because it is verbose.
            I argue that the complaint some have about its verbosity is of little meaning, those people have just used the shell so much that they naturally remember a lot of commands, what they’re used for and their specific syntax, but for a beginner it’s difficult to string everything together, because a lot of tools are of independent origin. Regardless, Powershell should by default have quite a few aliases to the commands/functions with long names so it’s not like you can’t have the best of both worlds

            • Laurel Raven@lemmy.zip
              link
              fedilink
              English
              arrow-up
              3
              ·
              1 day ago

              Yep.

              I use it as a command shell regularly and the verbosity isn’t an issue at all, between aliases and tab completion.

              Honestly, having used both for years, PowerShell is actually easier in many respects just due to the object pipeline and dotnet, once you get to know them well enough. Being able to just toss output into a variable and mess around with it to understand its structure and contents is huge

  • eldavi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    87
    arrow-down
    1
    ·
    3 days ago

    i love this person’s work; i’ve been working in the linux sphere for over 20 years but this person always teaches something that’s new to me and more helpful than the tools i’ve been using to get the job done; sed/awk in this case. (plus, the sense of humor also makes it fun to watch).

    i wish i were as rich as my fellow software engineers so that i can support her work because i’m convinced we need it in a world where people no longer have the same opportunities i had to learn this kind of tech because their smartphones inadvertently hide needful knowledge in the abstractions that make smartphones work.

    • nfms@lemmy.ml
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 days ago

      I’ve been following her for the past year, it’s a pity she doesn’t have a one time contribution scheme set up. I also can’t support everyone but judging from the donations on KDE people do tend to give small amounts and it really helps. Gonna try to contact her and see if she can accept something like that

    • mesamune@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      25
      ·
      3 days ago

      She does a great job. Im trying to add in a couple of her videos when I see them into the different communities. I usually go to awk to be honest, so I completely blanked on columns. I knew it existed from like 10 years ago, but forgot what I can use it for. I learned something form this video :)

      We need more entertaining Linux/open source people.

      • eldavi@lemmy.ml
        link
        fedilink
        English
        arrow-up
        13
        ·
        3 days ago

        We need more entertaining Linux/open source people.

        i think that this is what sets her apart from most; the sense of humor makes the video edit entertaining to watch like the on screen comments.

    • grue@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      3 days ago

      inadvertently

      I don’t think that word means what you think it means.

        • 4am@lemm.ee
          link
          fedilink
          arrow-up
          6
          ·
          2 days ago

          I don’t think they do it to make us dumber (there are other methods for that) but to make it accessible to people who don’t already know better.

          So, in this case, inadvertent is correct; Although it’s not without side effects.

        • grue@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          2 days ago

          Do I think it’s intentional that smartphones are ‘dumbed down’ compared to PCs, so as to turn them into devices for mindless consumption of corporate-controlled media instead of devices for empowering user freedom? Yes, yes I do.

          • eldavi@lemmy.ml
            link
            fedilink
            English
            arrow-up
            9
            ·
            edit-2
            2 days ago

            then its working very well; i learned this past xmas that my millennial/gen-z&a nephews/nieces are somehow less tech literate than their parents/grandparents.

            my well wishing for this channel was in the hopes of reversing this trend, but maybe it’s too little too late.

            we need superman; not mr. rogers. lol

    • Classy@sh.itjust.works
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      3 days ago

      Something else, all of the GNU coreutils have their own info [command] terminal command, and often the info page is incredibly easy to read, full of example pages and highly granular descriptions of flags, error messages, and the like.

  • grrgyle@slrpnk.net
    link
    fedilink
    arrow-up
    4
    ·
    2 days ago

    I’m still sore that column -nts, doesn’t work anymore. My mnemonic for remembering it was “unts, unts, unts” like a dance club beat.

    Actually looking at the usage text I’m not sure how the -n flag ever worked for me… Maybe I’m misremembering.

    • Fonzie!@ttrpg.network
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      If I need the top lines I usually just pipe output to less, but column is definitely going to help a lot!