The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sketsa SVG Editor 5.2 (Default branch) iBot Software Releases - RSS News 0 05-27-2008 10:30 AM
Sketsa SVG Editor 5.1.1 (Default branch) iBot Software Releases - RSS News 0 02-04-2008 12:10 PM
Menu Editor 1.3.4 (Default branch) iBot Software Releases - RSS News 0 02-04-2008 12:00 AM
Avalon SQL Editor 4.0 (Default branch) iBot Software Releases - RSS News 0 01-30-2008 11:10 PM
Changing default editor Tony Empire UNIX for Dummies Questions & Answers 1 12-26-2004 11:04 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-07-2005
aarora_98 aarora_98 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 33
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 (permalink)  
Old 12-07-2005
aarora_98 aarora_98 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 33
oops.............. even

$set EDITOR=vi
$export EDITOR

OR

$export EDITOR=vi

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

Help Plz......

Aru
  #3 (permalink)  
Old 12-12-2005
aarora_98 aarora_98 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 33
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 (permalink)  
Old 09-12-2008
amaltemara amaltemara is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 1
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 (permalink)  
Old 09-13-2008
very9music very9music is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 5
Quote:
~/.bash_profile
I don't use bash
  #6 (permalink)  
Old 09-13-2008
very9music very9music is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 5
vi <=> vim :-??
  #7 (permalink)  
Old 09-13-2008
RahulJoshi's Avatar
RahulJoshi RahulJoshi is offline
Registered User
  
 

Join Date: Aug 2008
Location: PUNE
Posts: 98
please fo follwing change in .profile and save change:
=============================
EDITOR=vi
export EDITOR
=======================
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0