aboutsummaryrefslogtreecommitdiffstats
path: root/usr.bin/keyinfo/keyinfo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/keyinfo/keyinfo.sh')
-rw-r--r--usr.bin/keyinfo/keyinfo.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/keyinfo/keyinfo.sh b/usr.bin/keyinfo/keyinfo.sh
new file mode 100644
index 000000000000..5879442db188
--- /dev/null
+++ b/usr.bin/keyinfo/keyinfo.sh
@@ -0,0 +1,10 @@
+#!/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
+}