4 ms·
Stop using awk, use a real programming language+shell instead, with structured data instead of bytestream wrangling: > ls -l | get user ┌────┬──────┐ │
by RGBCube 11mo ago
Stop using awk, use a real programming language+shell instead, with structured data instead of bytestream wrangling:
> ls -l | get user
┌────┬──────┐
│ 0 │ cube │
│ 1 │ cube │
│ 2 │ cube │
│ 3 │ cube │
│ 4 │ cube │
│ 5 │ cube │
│ 6 │ cube │
│ 7 │ cube │
│ 8 │ cube │
│ 9 │ cube │
│ 10 │ cube │
│ 11 │ cube │
│ 12 │ cube │
│ 13 │ cube │
│ 14 │ cube │
│ 15 │ cube │
└────┴──────┘
You don't need to memorize bad tools' quirks. You can just use good tools.
https://nushell.sh https://nushell.sh - try Nushell now! It's like PowerShell, if it was good.
- electricEmu 11mo agoPowerShell is open source and available on Linux today for those who enjoy an OO terminal. MIT licensed. https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.5 https://learn.microsoft.com/en-us/powershell/scripting/insta...
- anthk 11mo agoOnce you get TSV and CSV related tools, nushell and psh are like toys.
- ryapric 11mo agoWhile your recommendation is sound: this is not only a rudely-worded take, but also missing the point of the parent comment.
- esafak 11mo agoAlso, the nushell code is self-explanatory. Who knows what $3 refers to?
- simoncion 11mo ago> try Nushell now! So, I'm curious. What's the Nushell reimplementation of the 'crash-dump.awk' script at the end of the "Awk in 20 Minutes" article on ferd.ca ? Do note that "I simply won't deal with weirdly-structured data." isn't an option.