Write a program called home that takes the name of a user as its single argument and prints that user's home directory. Specifically
home steve
should print
/users/steve
if /users/steve is steve's home directory. (Hint: Recall that the home directory is the sixth field stored in the file /etc/passwd.)
There are a number of ways to accomplish this, here's a solution that uses cut:
grep "^$1\:" /etc/passwd | cut -d: -f6
You might also like to view...
Describe the structure of a typical email message, including the two main areas of the message and the components of each of those areas.
What will be an ideal response?
You can change the trigger in a presentation to play a video file from a WordArt image
Indicate whether the statement is true or false
A time-based animation that can display a 3D Map from different perspectives.
What will be an ideal response?
List the four goals of incident management.
What will be an ideal response?