For some idea, a one liner to find the (last) longest username and length in /etc/passwd:
$ awk -F: '{len=length($1);if(len>max){max=len;user=$1}}END{print user,max}' /etc/passwdThanks for that reply! It's good to work with an example.
I'll mark this on my GitHub when I get back on a computer, I take public datasets and make graphs and transforms and reports. The big survey companies have weird data records and having to write a parser is my least favorite part. I think other people who ingest my content don't appreciate the effort, but that's a near universal feeling I think, heh.
However, I feel I really should have taken the time to learn Awk better as it could probably be done there, and simply! (It was a good excuse to tinker with rust, but that's an aside.)