I have a curious problem, can't seem to understand why it happens.
I have a simple script which emails me basic network interface information, I use cron to schedule it hourly.
Here is the crontab entry
Code: Select all
1 * * * * sh -x ~/hourpeep.sh
Code: Select all
#!/bin/bash
rm ipcheck.txt
rm iwcheck.txt
rm hourpeep.txt
wget -qO- ipecho.net/plain > ipcheck.txt
echo " [i]hostname[/i] " >> ipcheck.txt
ip addr show >> ipcheck.txt
iwcheck wlan0 > iwcheck.txt
cat ipcheck.txt iwcheck.txt > hourpeep.txt
cat hourpeep.txt | msmtp -a default [i]myemail address[/i]
Can someone please explain what is going on here?
Thanks