I could grep through /etc/passwd but that seems onerous. \'finger\' isn\'t installed and I\'d like to avoid that dependency. This is for a program so it would be nice if there
The way that I figured it on Linux to get the full name into a variable was:
u_id=`id -u` uname=`awk -F: -vid=$u_id '{if ($3 == id) print $5}' /etc/passwd`
Then just simple use the variable, ex: $ echo $uname
$ echo $uname