projects
/
zc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
387024b
)
show last values from sensors
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Feb 2021 09:59:36 +0000
(10:59 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Feb 2021 09:59:36 +0000
(10:59 +0100)
last-heartbeat.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/last-heartbeat.sh
b/last-heartbeat.sh
new file mode 100755
(executable)
index 0000000..
cd7128a
--- /dev/null
+++ b/
last-heartbeat.sh
@@ -0,0
+1,13
@@
+#!/bin/sh -e
+
+ls -d queue/*/$( date +%Y-%m-%d ) | while read path ; do
+ last=$( ls -t $path | head -1 )
+ if [ ! -z "$1" ] ; then
+ imei=$( echo $path | cut -d/ -f2 )
+ echo -n "$path/$last "
+ grep $imei subvision-numbers.txt
+ else
+ echo "$path/$last"
+ fi
+done
+