Home Man
Search
Today's Posts
Register

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

set EDITOR=vi -> default editor not setting for cron tab

Tags
shell scripts

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 12-07-2005
set EDITOR=vi -> default editor not setting for cron tab

Hi All,

I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....

/////////////////////////////////////////////////////
$ set EDITOR=vi
$ echo $EDITOR

$ crontab -e
79
29 16 * * * /bin/sh /app/siebel/testdir/automate.sh
?
The crontab file was not changed.
$

///////////////////////////////////////////////////////////

Even if i do ,

$vi crontab

it opens a vi editor for me with name crontab ,
where I can write the above line

29 16 * * * /bin/sh /app/siebel/testdir/automate.sh

and save . But it is not showing me the crontab job when I do

$crontab -l

Can some bdy help me for this ..

PS : I have also tried

$setenv EDITOR vi

but in vain, still getting no results. Really need your help for this.....

Thanks & Regards,
Aru
# 2  
Old 12-07-2005
oops.............. even

$set EDITOR=vi
$export EDITOR

OR

$export EDITOR=vi

is also not working..... I feel sad. :-(

Help Plz......

Aru
# 3  
Old 12-12-2005
Hi friends ,


I got the solution to my problem. i feel to discuss it in the form, so that others will be benifitted ...


At cmd prompt I just have to write two lines

EDITOR=vi;
export EDITOR


Now, crontab -e will open a vi editor for me. :-)


Chow.
Aru
# 4  
Old 09-12-2008
Lightbulb check VISUAL env variable

I had the same problem, check and see if the VISUAL env. variable is set to something other than vi.

Code:
set | grep VISUAL

If so, then that's overriding the EDITOR variable.

Many ways to fix...


Add to your ~/.bash_profile (or /etc/profile, or /etc/profile.d/SOME_FILE)
Code:
export VISUAL=vi

# 5  
Old 09-13-2008
Quote:
~/.bash_profile
I don't use bash
# 6  
Old 09-13-2008
vi <=> vim :-??
# 7  
Old 09-13-2008
please fo follwing change in .profile and save change:
=============================
EDITOR=vi
export EDITOR
=======================
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
GNOME Desktop - Setting missing from dconf-editor? mrm5102 UNIX Desktop Questions & Answers 2 03-06-2014 02:31 PM
Default text editor spuzh Solaris 13 11-05-2013 04:03 AM
Problem with setting vi as my default editor in ksh ramesh12621 UNIX for Dummies Questions & Answers 8 05-03-2012 01:34 PM
Default editor in zsh yabhi_22 UNIX for Dummies Questions & Answers 1 05-27-2011 06:47 AM
Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen durgaprasadr13 Solaris 1 10-13-2008 07:39 AM
Pasting text in VI editor from a different editor harishmitty UNIX for Dummies Questions & Answers 10 09-10-2008 06:22 PM
Changing default editor Tony Empire UNIX for Dummies Questions & Answers 1 12-26-2004 10:04 PM


All times are GMT -4. The time now is 07:13 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password