Q: How to fix stubborn crontab corruption?

Q: How to fix stubborn crontab corruption?

Post by Tony Curti » Thu, 18 Feb 1999 04:00:00



Re: Q: How to fix stubborn crontab corruption?,

marimba> Upon exiting crontab -e (EDITOR=vi) I get
marimba> the message "The editor indicates that an
marimba> error occurred while you were editing the
marimba> crontab data - usually a minor typing
marimba> error.  Edit again, to ensure crontab
marimba> information is intact (y/n)? ('n' will
marimba> discard edits.)"

Well, either you really have an error somewhere in
the crontab file (impossible to say without seeing
the file), or...

check the exist status of "vi some_file" after
writing the file.  Should be 0 if it wrote OK.  If
it wrote OK, but the status *isn't* zero, then you
have a vi with an exit problem...

hth
tony
--
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien.  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:

 
 
 

Q: How to fix stubborn crontab corruption?

Post by Volker Borche » Fri, 19 Feb 1999 04:00:00


|> Is there a version of "vi" that exits with 0 to indicate complete success,
|> but codes like 1 and 2 to indicate some really minor error condition?

Yes. The RAND MH mail system even has a compile time option "ATTVIBUG"
to work around this "feature"...

--




 
 
 

Q: How to fix stubborn crontab corruption?

Post by Volker Borche » Fri, 19 Feb 1999 04:00:00


|> Thanks Tony.  It appears I have a vi with an exit problem.
|> How would I go about fixing that?

- write a shell wrapper
- use a real editor

--