getting a user's home dir (sed/awk?)

Svein Halvor Halvorsen svein.h at
Mon Apr 17 17:27:17 UTC 2006

On 4/17/06, Erik Norgaard <norgaard at> wrote:
> I have found "pw usershow user1" will return a line from the passwd
> file, but that needs to be split chewed, and spit out. Seems awk can do
> it but I have no clue.

cut is probably about the cheapest way to split a line:

pw usershow user1 | cut -d: -f9

Svein Halvor

More information about the freebsd-questions mailing list