shout out to the creator of Bash for making me Bash my Fucking Skull Into A Wall every time I read a script

i know I'm a moron with bash, but come ON there has got to be a better way to massage data than grep | awk | sed

@eletious Back when I was a log jockey it was all cut, awk and perl one-liners for me. The ones that seemed to have the easiest time with it were the awk hackers; I never got that good at it but I can tell you that it generally takes less awk than perl to do the same thing when it comes to mangling text files


@swaggboi i may end up rewriting the script I've been working on entirely - I did look into the awk bits and found that awk is really powerful, though I'm a bit worried about scripting myself into an AWKward position 😏

@eletious @swaggboi I did a little thinking about this last night although I haven't labbed anything yet.
Are you aware du has a --threshold option? It plays nice with human-readable numbers too. There's also an option to NULL separate the output, which will probably simplify your IFS hax

@zyk @swaggboi I ended up using du -k and then using awk to convert the byte size into GB when giving the report - i forgot that du on macos reports in 512-byte blocks

Sign in to participate in the conversation

are ya hungry? 🦆