Replacing original(s) with *.rpmnew
Nathan Johanson
nathan at TCPNETWORKS.NET
Sat Mar 8 18:48:03 GMT 2003
Thanks!
For some reason, this last upgrade replaced most of the reports in 3-4 of the languages. While it's unlikely I'll ever use these other languages, I figured it would be smart to go with the latest versions in all cases (and renaming them one-by-one seemed to beg for a more efficient method).
Next on the agenda...learn some shell scripting.
Sincerely,
Nathan Johanson
Email: nathan at tcpnetworks.net
-----Original Message-----
From: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
Sent: Sat 3/8/2003 5:14 AM
To: MAILSCANNER at JISCMAIL.AC.UK
Cc:
Subject: Re: Replacing original(s) with *.rpmnew
At 23:46 07/03/2003, you wrote:
Hello,
The other day I upgraded from 4.11-x to 4.13-3. As expected, Julian's
upgrade script simplified the process. However, I noticed several
reports had been replaced. While replacing the originals with the
*.rpmnew files, I figured there must be a better way to do it than "mv
filename.rpmnew filename" ; rm filename.rpmnew" for each file.
It only puts in an rpmnew if you have modified or otherwise changed the original file (loading it into an editor and saving it unchanged will modify the datestamp, which is enough).
There must be a way to do all *.rpmnew files in a directory with a short
shell script or compound command. Can someone give me a hand with this?
It would only be usefuly for files or reports I haven't changed, but
could potentially save me a lot of keyboard tapping.
for NEW in *.rpmnew
do
echo $NEW ...
F=`echo $NEW | sed -e 's/\.rpmnew//'`
[ -f $F ] && mv -f $F ${F}.rpmold
mv -f $NEW $F
done
exit
--
Julian Field
www.MailScanner.info <http://www.mailscanner.info/>
Professional Support Services at www.MailScanner.biz <http://www.mailscanner.biz/>
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list