diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-10 22:04:25 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-10 22:04:25 +0200 |
commit | ef0e52f65b864333a4c981b78a1f3299474deabf (patch) | |
tree | e27f973553b08513b2abf6185131b56055375f75 /doc/rat-cursors/get-hotspot | |
parent | m (diff) | |
download | mds-ef0e52f65b864333a4c981b78a1f3299474deabf.tar.gz mds-ef0e52f65b864333a4c981b78a1f3299474deabf.tar.bz2 mds-ef0e52f65b864333a4c981b78a1f3299474deabf.tar.xz |
add hotspot to example rat cursors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/rat-cursors/get-hotspot')
-rwxr-xr-x | doc/rat-cursors/get-hotspot | 10 |
1 files changed, 10 insertions, 0 deletions
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) + |