Annotation of src/usr.bin/skey/skeyinfo.sh, Revision 1.4
1.1 deraadt 1: #!/bin/sh
1.4 ! millert 2: # $OpenBSD: skeyinfo.sh,v 1.3 1996/09/27 15:41:37 millert Exp $
1.1 deraadt 3: # search /etc/skeykeys for the skey string for
4: # this user OR user specified in 1st parameter
5:
1.4 ! millert 6: KEYDB=/etc/skeykeys
1.3 millert 7: if [ -z "$1" ]; then
1.1 deraadt 8: WHO=`/usr/bin/whoami`
9: else
10: WHO=$1
11: fi
1.3 millert 12:
1.4 ! millert 13: if [ -f $KEYDB ]; then
! 14: /usr/bin/awk '/^'$WHO'[ ]/ { if ($2 ~ /^[A-z]/) { print $3-1, $4} else { print $2-1, $3 } }' < $KEYDB
1.1 deraadt 15: fi