[PLUG] sed command line script help
Percival, Ray
Ray.Percival at summit.fiserv.com
Fri Nov 8 23:51:23 UTC 2002
On what server is the #orlug of which you speak?
-----Original Message-----
From: Richard Langis
Sent: Friday, November 08, 2002 3:28 PM
To: plug at lists.pdxlinux.org
Subject: Re: [PLUG] sed command line script help
I needed to do the same thing, got help in the #orlug channel in about a
minute. Here's what the cool froods in there came up with:
addrext=`ifconfig eth1 |grep "inet addr" |awk -F":" '{ print $2 }' |awk
-F " " '{ print $1 }'`
just change 'eth1' to your appropriate interface and you're golden.
-R
Bruce Kingsland wrote:
> Howdy!
>
> I've been reading the docs, and I'm just getting more confused with
> sed. I want to extract the inet address from "ifconfig ppp0" to patch
> into an html doc for upload to my constant web space page.
>
> What to do with the data after it's gathered is relatively easy, I
> think; but getting the data is another matter.
>
> inet addr:192.168.0.177 Bcast:192.168.0.255 Mask:255.255.255.0
>
> Turning the above into:
>
> <A HREF=http://192.160.0.177> Ongoing Work In Progess </A>
>
> is the goal (the IP numbers here are for reference only).
>
> My plan is to paste this line in between the front and back of the
> rest of an html doc, and then scp it to it's destination; but only if
> the IP number has changed since the previous check.
>
> The docs seem unreasonably complex, or maybe I'm just making it that
> way. This seems like the sort of thing that's done often (especially
> where broadband is out of reach); so an example of such code ought to
> be more readily available?
>
> Any ideas?
> TIA!
> -bk
--
s u n m i c r o s y s t e m s
~ Richard Langis Jr. ~
richard.langis at sun.com
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]
_______________________________________________
PLUG mailing list
PLUG at lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list