From ef0e52f65b864333a4c981b78a1f3299474deabf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 10 Apr 2015 22:04:25 +0200 Subject: add hotspot to example rat cursors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/rat-cursors/get-hotspot | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 doc/rat-cursors/get-hotspot (limited to 'doc/rat-cursors/get-hotspot') diff --git a/doc/rat-cursors/get-hotspot b/doc/rat-cursors/get-hotspot new file mode 100755 index 0000000..bc6cc96 --- /dev/null +++ b/doc/rat-cursors/get-hotspot @@ -0,0 +1,10 @@ +#!/bin/sh -e + +data="$(cat)" + +y=$(echo "${data}" | grep -n @ | cut -d : -f 1) +x=$(echo "${data}" | grep -n @ | cut -d : -f 2 | sed 's/ /\n/g' | grep -n @ | cut -d : -f 1) + +echo x: $(expr $x - 1) +echo y: $(expr $y - 1) + -- cgit v1.2.3-70-g09d2