有没有办法运行RFSniffer
和./test2.sh
而不必中断?
trap './test2.sh' SIGINT
sudo sh -c ./433Utils/RPi_utils/RFSniffer 2>&1 | tee /home/pi/output.txt
这是我的while循环./test2.sh
while read line
do
if [[ $line =~ "Received 5592512" ]]; then
echo "Button A was pushed"
elif [[ $line =~ "Received 5592368" ]]; then
echo "Button B was pushed"
elif [[ $line =~ "Received 5592332" ]]; then
echo "Button C was pushed"
elif [[ $line =~ "Received 5592323" ]]; then
echo "Button D was pushed"
fi
done < output.txt