On Thu, 21 May 1998 [EMAIL PROTECTED] wrote:
> It worked; thanks!
>
> -JC
>
> P.S. one other thing, to the list.. anyone know of a program that will
> feed me *just* the IP address, so I don't have to do the "ifconfig.."
> mess?
>
in the file /etc/ppp/ip-up:
cat /etc/hosts-up | sed -e s/--IP--/$4/g > /etc/hosts
# $4 is our new IP addie passed by pppd
# something else nice :)
rdate -s timelord.uregina.ca
# now you'll always be ontime (:
> On Thu, 21 May 1998, Dave Wreski wrote:
>
> >
> > > if [ -a /var/run/ppp0.pid ]; then
> > > IP=`ifconfig | grep P-t-P | cut -c 23-34`
> > > cat /etc/hosts-up | sed -e s/--IP--/$IP/g > /etc/hosts
> > > fi
> > >
> > > If I execute the second and third lines, one at a time, from the command
> > > line myself, they work perfectly. But if I run them in a script (like I'm
> > > trying to do) sed keeps complaining:
> > >
> > > sed: Unterminated `s' command
> >
> > Wrap the s/--IP--/$IP/g in double-quotes.
> >
___________________________________________________________________
d a v i d @ m i h m reality.sys corrupt!
davemann-at-ionet-dot-net reboot universe(y,n)?
www.the-site.dyn.ml.org/ ICQ:4251923
-------------------------------------------------------------------
Key fingerprint = E4 90 15 ED E5 9F 18 8A B0 CC FF 68 61 36 4A 6F
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.