Implement Command whoami
Objective
Have a command, whoami, which does the following
help page
BusyBox v1.24.1 (2016-02-19 11:20:55 SGT) multi-call binary.
Usage: whoami
Print the user name associated with the current effective user id
Done
- When the command complies with the above interface
- When it can be compiled as an applet into the slimbox binary
Demo
Show each command as an 'applet', and that it conforms to the interface:
$ slimbox whoami --help
BusyBox v1.24.1 (2016-02-19 11:20:55 SGT) multi-call binary.
Usage: whoami
...
Show that when called as a symlink, the same happens
$ ln -s slimbox whoami
$ ./whoami --help
BusyBox v1.24.1 (2016-02-19 11:20:55 SGT) multi-call binary.
Usage: whoami
...