Re: How do i find dynamic IP assigned?
From: Roberto C. Sanchez (roberto_at_familiasanchez.net)
Date: 06/22/05
- Previous message: Robert Wolfe: "blueMail 1.2"
- In reply to: Marty: "Re: How do i find dynamic IP assigned?"
- Next in thread: Marty: "Re: How do i find dynamic IP assigned?"
- Reply: Marty: "Re: How do i find dynamic IP assigned?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 21 Jun 2005 19:16:52 -0400 To: debian-user@lists.debian.org
On Tue, Jun 21, 2005 at 07:06:08PM -0400, Marty wrote:
> Roberto C. Sanchez wrote:
>
> >-------- 8< --------
> >#!/bin/sh
> >EMAIL="you@example.com"
> >lynx -dump http://checkip.dyndns.org |sed -n '/Current/s/.*:
> >\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)/\1/p' | /usr/bin/Mail -s "IP address as of
> >`date`" $EMAIL
> >-------- 8< --------
> >HTH,
> >-Roberto
>
> FWIW this site requires no parsing:
>
> wget http://www.whatismyip.org/ -qO - | html2text | mail [etc etc ....]
>
>
FWIW, sed is a required package and thus guaranteed to be present on any
Debian system, while html2text is optional.
$ apt-cache show sed |grep Priority
Priority: required
$ apt-cache show html2text |grep Priority
Priority: optional
If the job can be done with Priority `required' or `important' tools,
there is a much better chance of the script being portable.
-Roberto
-- Roberto C. Sanchez http://familiasanchez.net/~sanchezr
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- application/pgp-signature attachment: stored
- Previous message: Robert Wolfe: "blueMail 1.2"
- In reply to: Marty: "Re: How do i find dynamic IP assigned?"
- Next in thread: Marty: "Re: How do i find dynamic IP assigned?"
- Reply: Marty: "Re: How do i find dynamic IP assigned?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|