Reputation: 186
Here is a part of my bash script. I want to track that the script is running. so each time it runs the counter will increment, when the counter hits X (3 for my test) something will happen. I also want the count to reset.
The counter is incrementing,
#!/bin/bash
counter=( `cat "/home/pi/auto/mark"` )
three=3
if [ "$counter2" -gt "$three" ]; then
echo 1 > /home/pi/auto/daycheck
Upvotes: 1
Views: 118
Reputation: 1
I am assuming your $counter2
is a typo
(( `</home/pi/auto/mark` > 3 )) && echo 1 > /home/pi/auto/daycheck
Upvotes: 3