Code and comments

  • SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    I’ve only ever found a use for sed once two decades into my career, and that was to work around a bug due to misuse of BigInt for some hash calculations in a Java component; awk remains unused. Bash builtins cover almost everything for which I find those are typically used.

    find and grep see heavy daily use.

    • meteokr@community.adiquaints.moe
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      That’s wild to me, as I used sed all the time. Quickly and easy changes in configs? Bam sed. Don’t even need to open vi when I can grep for what I need, then swap it with sed. Though I imagine more seasoned vi nerds would be able to do this faster.

    • palordrolap@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      If you’re using find all the time, check to see if you have or can have some variant of locate installed. It indexes everything* on the system (* this is configurable) and can be queried with partial pathnames, even with regex, and it’s fast.

      • SpaceNoodle@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        I use locate when I don’t know where the files are. Find has finer controls and can differentiate between regular files, links, directories, etc.

    • bizdelnick@lemmy.ml
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      sed is not for daily use, it is for reusable scripts. For other purposes interactive editors are more convinient.