procmail
[Top] [All Lists]

Unidentified subject!

1996-01-31 08:14:17
Hi,

I've got a recipe that I use to rename a file using mv.  Sometimes I get an
error in my log file and I don't understand why.  I guess I could use the
"i" flag, but I'd like to know why I would need to.

Here is the recipe:

 
   VERBOSE=yes

   :0wc
   $DIR
 
   # get directory/filename of created file
   FILE=$LASTFOLDER
 
   # rename it to a .save file name
   :0wc
   | /usr/bin/mv $FILE $FILE.save
 
   FILE=$FILE.save


And here is the log file: 


procmail: [23672] Tue Jan 30 21:21:12 1996
procmail: Assigning "LASTFOLDER=/moseley/list/save/msg.GBxB"
procmail: Opening "/moseley/list/save/msg.GBxB"
procmail: Acquiring kernel-lock
procmail: [23672] Tue Jan 30 21:21:13 1996
procmail: Assigning "FILE=/moseley/list/save/msg.GBxB"
procmail: Executing
"/usr/bin/mv,/moseley/list/save/msg.GBxB,/moseley/list/save/msg.GBxB.save"
procmail: Error while writing to "/usr/bin/mv"
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
procmail: Assigning "LASTFOLDER=/usr/bin/mv /moseley/list/save/msg.GBxB 
             /moseley/list/save/msg.GBxB.save"
procmail: Assigning "FILE=/moseley/list/save/msg.GBxB.save"


Even though there is an error reported, the file is renamed okay.  But I'm
curious why I get the error.  Is it because I'm piping the message to a
program the doesn't take std input?  Why do I only get the error sometimes?

So should I use the "i" flag and just ignore the error, or would another
syntax be better.  Such as:

   DUMMY=`/usr/bin/mv $FILE $FILE.save`

Thanks,
Bill
moseley(_at_)netcom(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>