home
/
code
/
khatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d77c737
)
Be a bit more-consistent with while loops
author
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 3 Aug 2018 17:17:24 +0000
(13:17 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 3 Aug 2018 17:17:24 +0000
(13:17 -0400)
bin/khatus
patch
|
blob
|
blame
|
history
diff --git
a/bin/khatus
b/bin/khatus
index
f649c87
..
21d3897
100755
(executable)
--- a/
bin/khatus
+++ b/
bin/khatus
@@
-20,9
+20,11
@@
run_producer() {
log="$3"
cmd="$4"
msg_head="$5"
- "$bin"/$cmd | while read line; do
- echo "${msg_head} $line" > "$pipe"
- done \
+ "$bin"/$cmd \
+ | while read line
+ do
+ echo "${msg_head} $line" > "$pipe"
+ done \
2> "$log"
# TODO: Perhaps direct log to pipe, so that controller can monitor sensors?
}
@@
-34,7
+36,7
@@
fork_reactor() {
fork_poller() {
interval="$1"
shift
- while
true
+ while
:
do
run_producer "$@"
sleep "$interval"
This page took
0.026155 seconds
and
4
git commands to generate.