Determining IP addr via script?

edj edj
Mon May 17 11:34:35 PDT 2004


On Mon July 8 2002 09:59 pm, Michael Hipp wrote:
> On Monday 08 July 2002 08:35 pm, edj wrote:
> > My knowledge is so limited, I hesitate to say, but I use the
> > following, picked up from somewhere . . . .
> >
> > #!/bin/bash
> > lynx -auth=admin:admin http://192.168.1.1/Status.htm
> >
> > Connects to the router and gives IP & all the other stuff, as well.
>
> Didn't know you could do that. Good one!
>
> Can you redirect the output to a file? (I don't have lynx on this system
> and I'm not behind the LinkSys router so I won't be able to try it for a
> few days.)
 
Well, the "lynx . . ." command can end with a redirect (> filename), but 
then you get all the http stuff.  Easier to just give the "p" command to 
lynx.  Then you get a nice, readable, file.
-- 
Ed Jabbour



More information about the Linux-users mailing list