I am trying to run ~bin/ap script multiple times with
dims@pterosaur:~$ while true; ~bin/ap; sleep 2; done
bash: syntax error near unexpected token `done'
where
dims@pterosaur:~$ cat bin/ap
#!/bin/sh
MAC="$(iwconfig wlp2s0 | sed -n 's/.*Access Point: //p' | xargs)"
if [ "$MAC" = "60:E3:27:8D:AC:F0" ]; then
MAC="tplink2"
elif [ "$MAC" = "60:E3:27:8D:7A:A6" ]; then
MAC="tplink1"
fi
echo "[$MAC]"
What's wrong here?
doafter the first;while true; do "$HOME/bin/ap" …