[PLUG] sed command line script help
Richard Langis
richard.langis at sun.com
Sat Nov 9 00:00:42 UTC 2002
IRC channel: irc.freenode.net #orlug port 6667
See http://orlug.dhs.org for more information.
-R
Percival, Ray wrote:
> 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]
More information about the PLUG
mailing list