#!/bin/sh # Find an entry in the password file pwent=`grep '^richard:' /etc/passwd` # The "full name" and other comments are in # field 5, colon delimited OIFS=$IFS; IFS=: ; set $pwent; IFS=$OIFS echo $5