Link to home
Start Free TrialLog in
Avatar of tel2
tel2Flag for New Zealand

asked on

SCO crontab / vi error?

I'm using SCO, and I've just tried to edit the root crontab (my first time on this machine), by entering the following command (logged on as root), and I get the following error:

# crontab -e
crontab: could not exec the editor.: No such file or directory (error 2)
crontab: warning: commands will be executed using /bin/sh

As you can see, I can display the contents of root's crontab OK:
# crontab -l

#       @(#) root 25.3 95/01/17
...etc...
17 5 * * 0 /etc/cleanup > /dev/null
...etc...


And here's the crontab file:
# ls -l /var/opt/K/SCO/Unix/5.0.4Eb/usr/spool/cron/crontabs/root
-rw-rw----   1 root     cron         948 Oct 15 10:52 /var/opt/K/SCO/Unix/5.0.4E
b/usr/spool/cron/crontabs/root


Here's my SCO version:
# uname -a
SCO_SV ctol33 3.2 2 i386


Any ideas how to make it so I can properly update root's crontab?
Avatar of yuzh
yuzh

Hi  tel2,

     You do the followings before editing the crontab:
      #EDITOR=vi
      #export EDITOR
      then use crontab -e command to edit your crontab. (you are
using vi editor in this case to edit the file)

      Cheers!

============
yuzh

     
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tel2

ASKER

Thanks vinnyd79, It worked!  (On AIX at least - haven't tried it on SCO yet, but I thought I shouldn't keep you waiting any longer).
You've given me a good workaround for the problem, so I'll give you a B, because I still don't know what's causing the error.  Got to leave room for improvement.
Thanks.

vuzh,
I have confirmed that EDITOR was already set to vi, and it was exported, so that wasn't the problem.