Total noob here. I am blindly stumbling my way through bash. I realize that there is a syntax error in the following script but, I cannot figure it out. The script just sits there.
#!/bin/bash
mac=`tail -F ~/scripts/scan.txt | grep -i "IP:" | cut -d "(" -f2 | cut -d ")" -f1`
sudo dhcpdump -i wlan0 > ~/scripts/scan.txt
echo $mac
Thanks for any help. I am gonna feel like an idiot when I find out.
-F
option oftail
is probably not something you want in a variable assignment as it as it will block waiting for bytes to be appended to the file.~/scripts/scan.txt
? Give me a ping with @A.B.