I thought I’ll make this thread for all of you out there who have questions but are afraid to ask them. This is your chance!

I’ll try my best to answer any questions here, but I hope others in the community will contribute too!

  • mumblerfish@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    This is 80% of my usage of awk and sed:

    “ugh, I need the 4th column of this print out”: command | awk '{print $4}'

    Useful for getting pids out of a ps command you applied a bunch of greps to.

    ”hm, if I change all ‘this’ to ‘that’ in the print out, I get what I want": command | sed "s/this/that/g"

    Useful for a lot of things, like “I need to change the urls in this to that” or whatever.

    Basically the rest I have to look up.