• hlqxz@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    I never really fully understood awk and sed. I don’t know felt really complicated to me

      • XEAL@lemm.ee
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Yes, they’re bitches to learn/use.

        Now with ChatGPT you can have a lot help with bash commands. It even helped me start with Python.

  • cryomancer20x6@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    echo "Why use many word when few do trick" | awk '{for(i=1;i<=NF;i++)if(length($i)>3)printf("%s ",$i);print""}' echo "Why use many word when few do trick" | sed -e 's/\b\w\{1,3\}\b//g' echo "Why use many word when few do trick" | grep -oE '\b\w{4,}\b'