Hi Matthew,

I think your first RCS command below should have been 'ci' rather than
'co' -- is that correct?

At initial glance, RCS a bit confusing, but something one could get used to.
Also, many of my scripts are likely to be called by cron jobs while I'm
editing, so playing with live versions is not a good idea.  However, used in
conjuction with my technique, the best of both worlds are possible:

cd /etc/rc.d
mkdir _edit_
cp rc.local _edit_
cd _edit_
mkdir RCS

Then use RCS to edit the copy of the file.  When ready to make it live, use
fupdate to do so.  All in all, I really like this solution.

Thanks again for checking out the script and offering your feedback!

bd



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matthew Melvin
Sent: Wednesday, January 03, 2001 9:46 PM
To: Brad Doster
Cc: [EMAIL PROTECTED]
Subject: Re: File Update Script


On Wed, 3 Jan 2001 [EMAIL PROTECTED] wrote:

> For those who are learning to script and use ir'regular expressions'
(should
> those be single or double quotes? <g>), well, I learn by example and rtfm
> when I have to -- my script is heavily documented -- if you also learn by
> example, this might be a good learning tool.  If you're among the more
> I welcome the feedback!

Your script itself looks pretty cool... but it is kind of re-inventing the
wheel a little bit.  Conceptually it does almost exactly the same thing as
RCS control does.

Instead of...

mkdir /etc/rc.d/_edit_
cp /etc/rc.d/rc.local /etc/rc.d/_edit_
Edit the copy of rc.local in the Edit Directory.
Execute this script (fupdate) and select rc.local as a file to update.

... you might do...

cd /etc/rc.d
mkdir RCS
co -u rc.local
... and enter a description for the file where prompted.
co -l rc.local
edit rc.local
ci -u rc.local
... and enter a description for the changes where prompted.

I don't know if you knew about that or not.  Perhaps you wrote your script
as a mental exercise in which case more power too you.. carry on. :)
Otherwrise you might want to chech out the rcsintro(1) man page - it's very
cool and having multiple revisious of my config files has saved me often.

Cheers,

M.

--
WebCentral Pty Ltd           Australia's #1 Internet Web Hosting Company
Level 1, 96 Lytton Road.           Network Operations - Systems Engineer
PO Box 4169, East Brisbane.                       phone: +61 7 3249 2583
Queensland, Australia.                            pgp key id: 0x900E515F




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to