I want to write a simple Bash script which displays the path to the home directory of a user when an actual user name is used as an argument and displays user not found or something when a user name that doesn't exist on this system is used as an argument.
Would this require a function? Can this be done by using basic GNU compatible commands in a script file?