Answer the question
In order to leave comments, you need to log in
Why does the script stop working after execution?
There is a TP-Link 3020 router with OpenWrt installed on it. A GSM modem is connected to the USB port of the router, which transmits the phone number via USB when an incoming call and opens the gate in parallel.
In /etc/rc.local script launch is registered The script ./test.sh &
itself
#!/bin/sh
cat /dev/ttyUSB0 | while read DATA; do
if echo $DATA | grep -q +7; then
DATEFORMAT=$(date '+%m/%d/%y %H:%M:%S')
echo $DATA $DATEFORMAT >> /www/1.txt
fi
done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question