Get the full name of a user via AppleScript or command line?

How can I get the full name of a user in Mac OS X via AppleScript or the command line?

Any ideas without using UI Scripting?
R�diger

This is an adaptation of a chunk of code found here:
http://macscripter.net/exchange/index.php?id=P194

do shell script "finger `whoami` | grep Login | colrm 1 46""

You can also use a scripting addition called “MacPack Toolbox.” Honestly I can never remember all those CLI commands and such for something as simple as this.

Available here (free): http://www.ExitToShell.com/products/index.shtml

jj and ExitToShell, thanks for the hints.
I found also a third way using the system_profiler from the command line.

Finally I have adapted jj’s solution with system attribute “USER” instead of the two back ticks commands.

Rüdiger

Welcome, ExitToShell!
I just wrote an article about search/replace text and speed, and “MP Replace” was the winner in the exposed test. The stuff is in spanish, but here is anyway:
http://homepage.mac.com/julifos/assartik/articulos/16.html