Visit The New, Modern Unix Linux Community


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


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting set EDITOR=vi -> default editor not setting for cron tab
# 1  
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  
oops.............. even

$set EDITOR=vi
$export EDITOR

OR

$export EDITOR=vi

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

Help Plz......

Aru
# 3  
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  
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  
Quote:
~/.bash_profile
I don't use bash
# 6  
vi <=> vim :-??
# 7  
please fo follwing change in .profile and save change:
=============================
EDITOR=vi
export EDITOR
=======================

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #765
Difficulty: Medium
Cache read misses from an instruction cache generally cause the longest delays because the processor, and in particular the thread of execution, has to wait until the instruction is fetched from main memory.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

GNOME Desktop - Setting missing from dconf-editor?

Hello All, Last night I installed OpenSuSE 12.1 (i586) on a HP Mini 110 laptop. And I selected GNOME as my Desktop during install... So I was trying to customize some things about the desktop, for example adding the Maximize/Minimize/Close options to the titlebar of a window. I did this... (2 Replies)
Discussion started by: mrm5102
2 Replies

2. UNIX for Dummies Questions & Answers

Problem with setting vi as my default editor in ksh

Hi , Below is the content of my .profile $cat .profile # Workstation users: Make changes to your .profile file in your home dir. . /.profile set -o vi PS1=$ But anytime I login I have to source "set -o vi" separately.Please suggest (8 Replies)
Discussion started by: ramesh12621
8 Replies

3. UNIX for Dummies Questions & Answers

Default editor in zsh

Guys, Can somebody help in setting vi as the default editor in zsh shell. I know that in ksh and bourne we can achieve the setting through .profile file. I want to replicate the behavior of ksh in zsh where on command prompt when one presses escape the screen acts as a vi. And one can use all... (1 Reply)
Discussion started by: yabhi_22
1 Replies

4. Solaris

How to set VI editor column size on Solaris?

I am setting the size using "stty columns 120" . But I still get the prompt saying "terminal too wide " when I am in vi. is there any time limit for this setting? how to set the column size to 120 permanently? Thanks in advance, Devi (4 Replies)
Discussion started by: pvkdevi
4 Replies

5. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

6. UNIX for Dummies Questions & Answers

Pasting text in VI editor from a different editor

Hi, I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question. How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'? As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies

7. Solaris

cron tab setting

hi guys , i need some help i want to set cron job for every sunday , of each month so any body plz help or this proble :confused: (1 Reply)
Discussion started by: Kbharat20
1 Replies

8. Solaris

where can i set editor option to yes

Hi all I am new to this forum (just registered) I need help from you guys Even if it is a basic question please don't hesitate to answer.Any answer will be helpful to me I am unable to get the previously entered commands by pressing uparrow When i enered uparrow it is giving ^[[A I got... (2 Replies)
Discussion started by: oracle_sri
2 Replies

9. AIX

How to set path for the EDITOR variable?

For some reason something has changing in my AIX environment where when I type: ACLEDIT filename ...I get: 3002-104 acledit: EDITOR environment variable must be full pathname I know I need to reset the EDITOR variables path to /usr/bin/vi but I can't remember the syntax anyone? (2 Replies)
Discussion started by: heprox
2 Replies

10. UNIX for Dummies Questions & Answers

Changing default editor

Redhat 9 I want to change my default text editor from vi to pico. When I look in the .bash_profile or .bashrc I do not see the EDITOR variable. So how do I change the default permanently? (1 Reply)
Discussion started by: Tony Empire
1 Replies

Featured Tech Videos