[PLUG] sed command line script help

Bruce Kingsland brucek at kingkon.com
Fri Nov 8 23:11:29 UTC 2002


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
-- 
Bruce Kingsland
Kingsland Konsulting
brucek at kingkon.com
360-531-3730
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D/2B8DA3D7 g/2884A18E  49C3 BBDE 6BC5 3F39 0C03  3BE4 FBC5 2C8D 2B8D A3D7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20021108/e05a5821/attachment.asc>


More information about the PLUG mailing list