LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-07-2004, 03:54 AM   #1
skwattakamp
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core
Posts: 2

Rep: Reputation: 0
Question environment variable definition


I AM A NEWBIE AND I AM TRYING TO RUN USER-DEFINED CRONTABS ON FEDORA 2 FOR THE PURPOSE OF SYSTEM CLEANUPS. ONE THAT I AM TRYING TO RUN IS STORED UNDER /VAR/SPOOL/CRON. HOW DO I DEFINE AND EXPORT THE 'EDITOR' ENVIRONMENT VARIABLE SO I CAN EDIT MY SCHEDULES. I HAVE NOTICED THAT WITHIN etc/profile, THE 'EDITOR' VARIABLE IS NOT DEFINED. IF ANYONE HAS THE CODE FOR THAT I WOULD GREATLY APPRECIATE IT.
 
Old 07-07-2004, 03:41 PM   #2
MrJoshua
Member
 
Registered: Apr 2002
Location: Houston Texas
Distribution: Debian / Gentoo / RHEL
Posts: 209

Rep: Reputation: 31
If this is going to be an automated task I would recommend that you take advantage of cron.daily, cron.hourly etc.... You will also have to read that man pages for crontab, because it will require different things based on what you want to do. If you will let us know exactly what you need cron to do then I can help more.
 
Old 07-07-2004, 04:15 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
MrJoshua - I think he was asking about how to specify an editor. It should default to a 'vi' but he can set it to anything, of course.

skwattakamp - You have two problems - 'tr [:upper:] [:lower:]' for an approximate solution to the first.

For the second, 'crontab -e' wants $VISUAL. So either

export EDITOR="your_editor"
(for general usage)
export VISUAL="your_editor"
(for crontab)

in .bashrc or .bash_profile should do (or /etc/profile, but that's system-wide).
 
Old 07-14-2004, 02:45 AM   #4
skwattakamp
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your replies Digiot and MrJoshua. Digiot could you please explain the nature of the first issue, regarding conversion from upper to lower case. Where does that factor in? Again for me to export the editor, would i not have to extract it first? If anyone has code availabale that sets the EDITOR variable, I would greatly appreciate it. Digiot I am setting the editor specifically for executing crontab -e to edit user-defined schedules. The scripts are ratyher easy MrJoshua, just simple file removals. It's the configuration issues I am having problems with.
 
Old 07-23-2004, 11:17 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Sorry about disappearing.

The first was a bad joke about your caps-lock post.

As far as the rest, I guess you've gotten it straightened out by now. I hope so, because I'm confused. If you want to edit your crontab with a specific editor, you export the variable in your shell's init scripts. There's no 'code' beyond what I posted above and there's no 'extracting' unless you're trying to compile the editor and not just assign it to a variable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variable gamor Linux - Newbie 4 04-30-2005 05:28 PM
Environment Variable salmanucit Linux - Software 2 07-21-2004 02:27 AM
environment variable mimi Linux - Newbie 1 04-10-2002 08:29 AM
environment variable mimi Linux - General 2 04-10-2002 07:45 AM
how to set CC environment variable mr.moto General 2 12-18-2001 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration