telegraf/plugins/inputs/execd/examples/count.sh

12 lines
189 B
Bash
Raw Normal View History

#!/bin/sh
2020-02-28 18:46:03 +00:00
## Example in bash using STDIN signaling
counter=0
while read LINE; do
2020-02-28 18:46:03 +00:00
echo "counter_bash count=${counter}"
counter=$((counter+1))
2020-02-28 18:46:03 +00:00
done
trap "echo terminate 1>&2" EXIT