On Fri, Nov 27, 2015 at 01:19:33PM +1100, scsijon wrote:
> I was just wondering which is better for response and clean output format in
> a script since toybox has both available.

'whoami' is not POSIX (which is what the openbsd manpage link mentions),
but is widely available.
'id' is POSIX, and generally available.
'logname' is the POSIX equivalent to 'whoami', but it's not widely available.

whoami, logname, and id -un are all equivalent in output: the plain username
of the current user, as per /etc/passwd.

HTH,
Isaac
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to