To extract the full name from the output of the getent command, you can use awk to filter the relevant field. Here's a command that does this:
getent passwd $(whoami) | awk -F: '{print $5}'
Explanation:
getent passwd $(whoami): Retrieves the user information for the current user.awk -F:: Sets the field separator to a colon (:).{print $5}: Prints the fifth field, which typically contains the full name.
This command will output the full name associated with the current user. If you have any more questions, feel free to ask!
