Probably this be a silly question, for this reason I'm posting it here, instead of the Bash forum.
This script instead of the loop, opens and closes the terminal screen so fast that I can not see what it did.
The script works fine if I remove the string `date "+%D %R"` from the echo command line.
Also, if I type manually the two lines of the loop in a terminal, I get the expected answer.
Any help will be fully apreciated.
Thanks in advance.
Juan
#!/bin/bash
for (( ; ; ))
do
mac=$(ifconfig wlan0 | grep HWaddr | sed 's/.*HWaddr //')
echo `date "+%D %R"`" MAC ADDRESS local es $mac"
sleep 5m
done





