projects
/
eg5120
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b5048f
)
fix
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 30 Jun 2023 14:33:06 +0000
(16:33 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 30 Jun 2023 14:33:06 +0000
(16:33 +0200)
mqtt-pgsql.sh
patch
|
blob
|
history
diff --git
a/mqtt-pgsql.sh
b/mqtt-pgsql.sh
index
e25d39f
..
2f8c2e8
100755
(executable)
--- a/
mqtt-pgsql.sh
+++ b/
mqtt-pgsql.sh
@@
-2,7
+2,7
@@
mosquitto_sub -h localhost -t eg5120 | while read json ; do
date=$( date +%Y-%m-%dT%H:%M:%S )
- ec
n
o -n $date ' '
+ ec
h
o -n $date ' '
echo $json | tee data/$date.json | tee /dev/shm/last-eg5120.json
psql --quiet -c "copy eg5120 (json) from '/dev/shm/last-eg5120.json'" eg5120
done