1
0
Fork 0
telegraf/plugins/inputs/execd/examples/count.sh

13 lines
190 B
Bash
Raw Normal View History

#!/bin/sh
## Example in bash using STDIN signaling
counter=0
while read -r _; do
echo "counter_bash count=${counter}"
counter=$((counter+1))
done
trap "echo terminate 1>&2" EXIT