[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: home directory



Craig White wrote, On 12/19/2008 12:03 PM:
Or lastly, this might be useful...

# cat users_get_home
#!/bin/sh
#
getent passwd | grep $1 | awk -F: '{ print $6 }'

# ./users_get_home craig
/home/users/craig

Craig


Thanks for that getent call suggestion, it simplifies one of my scripts greatly.

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]