Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix Subject: Re: data bases such as /etc/passwd Message-ID: <2329@sun.uucp> Date: Thu, 20-Jun-85 05:52:43 EDT Article-I.D.: sun.2329 Posted: Thu Jun 20 05:52:43 1985 Date-Received: Sun, 23-Jun-85 00:58:22 EDT References: <448@cmu-cs-k.ARPA> <298@bdaemon.UUCP> <226@luke.UUCP> Organization: Sun Microsystems, Inc. Lines: 11 > How about: > > grep "^key" file | awk -F: '{print $n}' Which only works if the key field is the first field in the record - and will also match "keywest". Besides, the guy asked for "libraries" - i.e., he presumably wants the moral equivalent of "getpwnam" and "getpwuid" and the like. Guy Harris