shout out to the creator of Bash for making me Bash my Fucking Skull Into A Wall every time I read a script
@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
nushell is pretty wild for working with data/objects instead of text, but might not be helpful for this particular usecase.
@eletious can we see a sample of your data, and what exactly you're trying to do with it? (apparently I'm a glutton for punishment)
@zyk @swaggboi sure - I'm aggregating several -p <directory> <size> arguments into an array and attempting to run du -h piped into awk to determine if a directory or file exceeds a size threshold. the trouble arose when i tried to split the du -h output into chunks for processing - using 'for i in `du -h $path`' turns the output into a space-delimited array, but then putting the du output into an array and iterating by index broke things in an even more hilarious way.
Ultimately, after spending some time AFK, I've decided that the approach was kind of dumb and I was too frustrated to actually think about it properly. I don't know how, but at one point in my fussing about I got the du output into an array, but newline-delimited instead of space delimited, and I hadn't touched IFS... at that point it was time to whine on the Internet
@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 😏
are ya hungry? 🦆