Complete.Org: Mailing Lists: Archives: discussion: August 1999:
Re: Script help - was [aclug-L] Scropt help
Home

Re: Script help - was [aclug-L] Scropt help

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: Re: Script help - was [aclug-L] Scropt help
From: Sanjay Dhar <sxdhar@xxxxxxxxxxx>
Date: Fri, 20 Aug 1999 14:27:07 -0500 (CDT)
Reply-to: aclug-L@xxxxxxxxxxxx


On Fri, 20 Aug 1999, Wayne White wrote:

> Well, I've gotten it working with a simple script. Actually it's
> two scripts, the second run by the first.
> 
> After connecting I run a script called "refresh." It goes like this:
> 
> tail /var/log/messages | grep local | awk '{ print $9 "/reunion.html" }'
> >/temp/IP_num
> 
> ftp -vn southwind.net < ftp.put
>  
> 
> And ftp.put looks like this:
> 
> user wwhite password 
> binary
> cd .www
> delete IP_num
> lcd /temp
> put IP_num
> 
> 
> This works very well. I sure appreciate everyone's help with it. Now I just
> need to figure out how to get the web page to use the contents of IP_num as
> the URL in the appropriate link. I thought that would be the easy part. Wrong.
> I'll figure out something though. Any HTML gurus have any ideas about that?

If it's a text file that you are FTPing, you might want to use ascii mode
of transfer instead of binary so that you don't see any strange control
chars in your file.

From the information that you have provided, it seems to me that you can
use a simple shell script using "sed" to do the substitutions. If you want
to automate the whole process into one script. You can "get" the HTML file
that you wish to modify, run sed on it and "put" it back onto the remote
host. If you can paste the part of the HTML file where the modifications
need to be made, I might be able to provide you with more specific
commands.

----------------------------------------------------------------------------

      SANJAY DHAR

      sxdhar@xxxxxxxxxxx

      http://www.cs.twsu.edu/~sxdhar

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


[Prev in Thread] Current Thread [Next in Thread]