sed problem

1998-06-15 Thread Ronnie . N . Glasscock
second try at posting, hope I get this one correct. # REMOVE everything above this line # # # shell script to test sed # # I called this file x # the command I use to run it issh x # bash is my default sh # #-rwxr-xr-x 1 root bin279352 Mar 31 1997 /bin/bash* # # this was

Re: sed problem

1998-05-22 Thread David Mihm
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

Re: sed problem

1998-05-21 Thread jcurbo
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? On Thu, 21 May 1998, Dave Wreski wrote: > > > if [ -a /var/run/ppp0.pid ]; then > > IP=`ifconfig | grep P-t-P | cut

Re: sed problem

1998-05-21 Thread Dave Wreski
> 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 sc

sed problem

1998-05-21 Thread jcurbo
I'm using RH 5.0, and I have a dial-up connection to the Net. When I dial in, I run a script containing these lines, to update my /etc/hosts: 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