[plug] Pointers With Bash Scripting - Please
Earnshaw, Mike
earnshawm at wa.switch.aust.com
Tue Jan 30 16:44:25 WST 2001
Pluggers,
I am trying to automate the process of updating files on my RH system.
Rather than me keep d/l the files and installing them, I would like to
have a list of the installed files on my system. I could then get a
script to look at that file and check with RH FTP site if there are any
d/l (maybe?), get them and install them.
As I am not real good at scripting is this a feasible idea or am I onto
plumbs?
I figured some kind of "logic" like this:
1. Two files, one containing a list of available updates
(ZXYlalalala.i386.rpm) [ONE] and the other containing the list of
installed files on the system (ZXYlalalala) [TWO]. Difference being the
.i386.rpm or 9 characters)
2. I want to be able to remove (cut, awk?) those last nine characters
and then compare the two files (diff?) for the files in [TWO] that are
in [ONE], maybe this is piped into [THREE]?, to give me the .i386.rpm
files that are on my system.
3. For those files in [THREE] I then want to run the rpm program on each
line of this list.
4. After the .rpm files have been run they can be deleted.
The idea being to automate if possible system updates. So I can d/l any
updates from the web and have a script auto install them if required.
Make sense?
I don't want the solution, but a prod in the right direction to assit my
learning would be appreciated.
Thanks
Mike
More information about the plug
mailing list