Re: sed question & an echo question

From: Noi (noi_at_siam.com)
Date: 10/18/03


Date: Sat, 18 Oct 2003 20:46:16 GMT

On Sat, 18 Oct 2003 13:39:57 +0000, shayne without thinking wrote:

>
> Noi wrote:
>
>> On Wed, 15 Oct 2003 05:49:15 +0000, Chris F.A. Johnson without thinking
>> wrote:
>>
>> > On Tue, 14 Oct 2003 at 23:11 GMT, Paul Lutus wrote:
>> >> shayne wrote:
>> >>
[snip]
>>
>> Thanks for the tips. Questions:
>>
>> Except that the OP wanted to learn sed what would be wrong with rpm
>> -Uvh *.rpm ? after saving rpms to a folder? Otherwise he'd have to
>> maintain a list of *.rpms.
>>
>> Doesn't -U upgrade existing and add new packages?
>
> On a CD-RW I have the latest rpm updates released by mandrake. I make a
> file
> with the list of filenames ls /mnt/cdrom >/filelist and add rpm -Uvh to
> the
> beginning of each line on this file. I manually edit this file to
> exclude any
> updates I don't need, make this file executable and run it to update my
> packages. Instead of rpm -Uvh, I could use rpm -Fvh which only updates
> the packages that are installed. I don't know if it's the best way to
> update the
> packages but it works for me. I hope everyone has a nice weekens.
>
> Shayne

Well, you could just cd to the CDrom and rpm -Uvh *.rpm and that would
take care of the upgrades.

However, Chris and the others are providing excellent tips for scripting
an install or upgrade. Incorporating their suggestions into your script
for building a file of new and updated rpms would go a long way to
improving your shell scripting knowledge. A purpose for writing scripts
is to automate routine tasks so you don't have to write the script again.

I suggest you should continue improving your script to mount the CDRom, create
the list of rpms on the CD, and then update -Uvh those rpms from the CD,
maybe later include code to skip those rpms that haven't changed.



Relevant Pages

  • Re: rpm check script problem
    ... Part of the script involves using file descriptors. ... come from $filename, you should have said ... The next read statment is reading from channel 0 so it reads the first ... line of $filename and puts it into the variable rpm. ...
    (Fedora)
  • [opensuse] BASH script help needed - Why is full path required?
    ... the full path name for rpm to be able to install the file, ... script is executed in the same directory as the file. ... I have underlined the rpm ... file as a command line option or make sure it is in the present working ...
    (SuSE)
  • Re: [SLE] repost: Just installed apt4rpm on SuSE 8.2 and having problems
    ... I made a script that can easily test the rpm update (it actually performs "rpm ... Tired of knowing which apt command does what and tired of the special argument ... The script will hide commands like: ...
    (SuSE)
  • Re: [opensuse] Microsoft fonts
    ... produce "a lot of error messages" and bypass the RPM system? ... RPM, but the build script requires a utility called ttmkfdir which I ... If you already have those ttf files available somewhere, ...
    (SuSE)
  • Re: Running a Script- and debugging.
    ... $0 is usually the name of the script itself, so 'dirname $0' is the ... bash or csh script or something else. ... change log for the bash rpm and read the bug reports. ...
    (Fedora)