From a50f7e4b3559b650f7c95f6320a86263b08feb53 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 19 Jan 2014 09:36:03 -0500 Subject: [PATCH] remove timestamp and then parse dmesg --- reset-reader.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reset-reader.sh b/reset-reader.sh index 2f09071..cf1d31d 100755 --- a/reset-reader.sh +++ b/reset-reader.sh @@ -1,7 +1,7 @@ #!/bin/sh -xe #dev=`lsusb | grep 076b:5.21 | awk '{ print $2 "-" $4 }' | sed -e 's/0//g' -e 's/://'` -dev=`dmesg | grep OMNIKEY | cut -d" " -f3 | cut -d: -f1 | tail -1` +dev=`dmesg | grep OMNIKEY | sed 's/\[.*\] //' | cut -d" " -f2 | cut -d: -f1 | tail -1` authorized=/sys/bus/usb/devices/$dev/authorized test -w $authorized || exit 1 echo 0 > $authorized -- 2.20.1