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
editing ELF file tejuwala Linux 1 05-18-2008 12:22 AM
Hex editing Swanie UNIX for Dummies Questions & Answers 3 12-08-2007 01:11 AM
File editing using awk rinku11 Shell Programming and Scripting 2 11-23-2006 11:34 AM
editing cron csaunders SUN Solaris 2 07-28-2005 11:02 AM
Editing /etc/mail.rc fundidor UNIX for Dummies Questions & Answers 1 01-27-2005 12:23 AM

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 08-11-2006
pankajkrmishra pankajkrmishra is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 55
Editing Crontab

Hi

I am not able to edit crontab.

Following is the comand that is being issued

$crontab -e
2764 ............ This is what I am able to see

But when I do
$crontab -l
List of all the crontab entry is displayed.

Also I am seeing one entry in my /etc/cron.d
prw------- 1 root root 0 Aug 10 12:29 FIFO

What does p stands for...... in permission section

Please suggest

Regards
Pankaj
  #2 (permalink)  
Old 08-11-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,426
When you specify the -e option, crontab invokes the editor specified in the environment variable EDITOR. If the variable is not set, crontab uses the vi editor.

Check the value of the variable EDITOR.


Jean-Pierre.
  #3 (permalink)  
Old 08-11-2006
pankajkrmishra pankajkrmishra is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 55
Hi
I checked the setting by echo command

$echo $EDITOR
vi

It shows it is vi, still crontab -e is not working .. it give some no like 2764

but when i do like this I am able to change the entry of my cromtab

$crontab < /path/of/the/textfile/which/has/cronentry/mycronentry.txt

Please suggest

Pankaj
  #4 (permalink)  
Old 08-11-2006
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Did you remember to

export EDITOR

after setting it to "vi"?

Also (if you're on a Sun box) crontabs will be in /var/spool/cron/crontabs.

Cheers
ZB
  #5 (permalink)  
Old 08-12-2006
pankajkrmishra pankajkrmishra is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 55
Hi

I exported the vi EDITOR also in .profile file, but again its showing some no when I issue $ crontab -e


Do we need to add magic line( #! /bin/sh ) in this file too

Please suggest

Pankaj
  #6 (permalink)  
Old 08-12-2006
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Does it work from the command line?

Code:
$ EDITOR=vi
$ export EDITOR
$ crontab -e
Cheers
ZB
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 11:41 PM.


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