On Thu, Jan 03, 2002 at 09:39:55AM -0600, Jima wrote: > On Thu, 3 Jan 2002, Petre Scheie wrote: > > > How about this: > > > > cp filename `grep $1 /etc/passwd |cut -d: -f6` > > Yes and no. On a small system, sure. But on a machine with a lot of > users, you might get a false positive off of a partial match, or a match > from a different field of another user entry. And I think on a system using NIS it won't even work at all, since you just get '+::::::' to search for. On that note, I think there would be a way to query NIS for home dir, no? I wonder what it is... ("Yes, I think reading the NFS/NIS book is more interesting right now than what I'm _supposed_ to be doing," he said heading for the bookshelf.) Clearly this is something that is easy to do on one particular system, but difficult to do in the general case of all Unix systems. -- "Trying to do something with your life is like sitting down to eat a moose." --Douglas Wood