[Solved] Bash ping script with LCD error message errors


The following lines of code in your program aren’t C at all. They look like a fragment of shell script:

lcd_command(LINE_3);
{while true; do
ping -c1 192.168.10.30 2>&1 /dev/null;   //VPN IP
lcd_writechars("STS300");}
{if [[ ! $? ]]; then
lcd_writechars("VPN Lost");
fi;
sleep 10;
}

This won’t work. Rewrite this code in C. (The system() function may be helpful.)

solved Bash ping script with LCD error message errors