[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: cron job
- From: kalyx cdsnet net (Marc Greene)
- Subject: Re: cron job
- Date: 3 Jan 1999 22:25:44 GMT
Your script didn't work for me either, but this one did:
#!/bin/bash
ip=`/sbin/ifconfig | grep -A 4 ppp0 \
| awk '/inet/ { print $2 } ' | sed -e s/addr://`
work_address="your work address"
echo "$ip" | mail "$work_address"
exit
Also have you tried using using the 'mail' command on its own? Are you
sure that sendmail is set up correctly? If not, then it won't work.
--
Marc Greene
On Sun, 03 Jan 1999 20:17:32 GMT, Gary Neff <Dante Death com> wrote:
>I am trying to write a simple cron.daily script to send my work email
>address my home computers IP which is running a IP masq with a dynamic
>IP here is the script I have but it is not working
>
>#!/bin/bash
>
>set myemail = "work email address"
>set ipaddress = `ifconfig | grep addr: | grep -v 127.0.0.1 | awk ' {
>print $2 } ` | awk -F : ' {print $2} '
>
>echo "My IP address is $ipaddress" | mail $myemail
>
>this just dont work and would be happy to just recieve a print of my
>entire ifconfig file if that would be easier any thoughts?
------=_NextPart_000_000E_01BE4ED5.3B05F7C0--
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]