3 ms·
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 u
by tyingq 5y ago
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/passwd
- flandish 5y agoThanks for that reply! It's good to work with an example.
- deleted 5y ago[deleted]