Bob:

A "Chris Dowling" was kind enough to share this for some other subscriber to
this list. I have been looking for a script of this sort for a while as what
I had been doing before was getting cron to e-mail me every hour so I know
the IP address of network server on a dynamic dialup ISP.  His script does
not use cut but I bet cut could be utilized in some way here to achieve what
you need. Here is the script:

ifconfig ppp0 | grep 'inet addr' | awk -F: '{ print $2 } ' | awk '{ print
$1 } ' | mail -s 'ip address' [EMAIL PROTECTED]

Eddie Strohmier



----- Original Message -----
From: "Bob Hartung" <[EMAIL PROTECTED]>
To: "redhat-list" <[EMAIL PROTECTED]>
Sent: Thursday, December 21, 2000 8:08 PM
Subject: use of 'cut' to pull dynamic IPADDR from ifconfig


> Hi,
>   Progress slow but sure.  Got everything running withh
> diald - not sure why it works but it does.  There was
> recently a message using grep, cut and ifconfig output to
> pluck a dynamically assigned IP address to use in
> firewalls.  Does someone have the message.  I can get it to
> xxx.xxx.xxx.xxx Bcast but can't figure out the last cut
> where the delimiter is a blank.
>
>   Thanks
>
> Bob
> --
> Bob Hartung
> www.radiologygrouppc.com
> www.qchealthwatch.com
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to