data bases such as /etc/passwd

Guy Harris guy at sun.uucp
Thu Jun 20 19:52:43 AEST 1985


> 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



More information about the Comp.unix mailing list