99.9% of my awk use case is to split a line (a la "cut - d\ - f) while discarding successive spaces.
e.g.:
$ echo "key: value" | awk '{print $1}'
value
Open to a simpler replacement :-)Check out https://github.com/sstadick/hck and https://github.com/theryangeary/choose - both are alternatives for cut/awk and allows regex based split as well. Though, they don't remove starting/ending whitespaces IIRC.
I wrote a script (https://github.com/learnbyexample/regexp-cut) that uses `awk` to provide a `cut`-like tool with regex-based split, negative index, etc. And this will take care of starting/ending whitespaces as that's the default `awk` behavior.