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