1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/usr.bin/keyinfo/keyinfo.sh

11 lines
258 B
Bash
Raw Normal View History

#!/bin/sh
# search /etc/skeykeys for the skey string for this user OR user specified
# in 1st parameter
PATH=/bin:/usr/bin
test -f /etc/skeykeys && {
WHO=${1-`id | sed 's/^[^(]*(\([^)]*\).*/\1/'`}
awk '/^'${WHO}'[ ]/ { print $2-1, $3 }' /etc/skeykeys
}