* Setting the editor environment variable for crontabs in Fedora 2
@ 2004-07-29 9:04 Keletso Keletso
2004-07-29 9:13 ` Luca Ferrari
0 siblings, 1 reply; 8+ messages in thread
From: Keletso Keletso @ 2004-07-29 9:04 UTC (permalink / raw)
To: linux-admin
Hopefully someone can offer assistance here. I am
trying to edit user-defined crontabs which stored in
/var/spool/cron using crontab -e. Now I am being
informed I cannot use vi to edit those crontabs and
instead must extract and export a different editor
(pref VISUAL). Could anyone assist me with the steps
(e.g. which env profile file must i change to make
this accomodation and what is the script code).
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 9:04 Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
@ 2004-07-29 9:13 ` Luca Ferrari
2004-07-29 10:53 ` urgrue
2004-07-29 11:14 ` Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
0 siblings, 2 replies; 8+ messages in thread
From: Luca Ferrari @ 2004-07-29 9:13 UTC (permalink / raw)
To: linux-admin
On Thursday 29 July 2004 11:04 Keletso Keletso's cat walking on the keyboard
wrote:
> Hopefully someone can offer assistance here. I am
> trying to edit user-defined crontabs which stored in
> /var/spool/cron using crontab -e. Now I am being
> informed I cannot use vi to edit those crontabs and
> instead must extract and export a different editor
> (pref VISUAL). Could anyone assist me with the steps
> (e.g. which env profile file must i change to make
> this accomodation and what is the script code).
>
I'm using vi to edit crontab, but you can simply changing the editor doing:
export EDITOR=emacs
crontab -e
that will start using emacs.
You can add the export= line to you .profile (or .bash_profile) file. Why
aren't you using vi? It's quite fast for editing crontabs....
Luca
--
Luca Ferrari,
fluca1978@infinito.it
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 9:13 ` Luca Ferrari
@ 2004-07-29 10:53 ` urgrue
2004-07-29 19:10 ` Scott Taylor
2004-07-30 12:20 ` editing crontabs Keletso Keletso
2004-07-29 11:14 ` Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
1 sibling, 2 replies; 8+ messages in thread
From: urgrue @ 2004-07-29 10:53 UTC (permalink / raw)
To: admin
> Why aren't you using vi? It's quite fast for editing crontabs....
joe, pico or nano are very fast and more newbie-friendly than vi. i
highly recommend those for quick editing tasks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 10:53 ` urgrue
@ 2004-07-29 19:10 ` Scott Taylor
2004-07-30 12:20 ` editing crontabs Keletso Keletso
1 sibling, 0 replies; 8+ messages in thread
From: Scott Taylor @ 2004-07-29 19:10 UTC (permalink / raw)
To: admin
urgrue said:
>> Why aren't you using vi? It's quite fast for editing crontabs....
>
> joe, pico or nano are very fast and more newbie-friendly than vi. i
> highly recommend those for quick editing tasks.
Sacrilege!
--
Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* editing crontabs
2004-07-29 10:53 ` urgrue
2004-07-29 19:10 ` Scott Taylor
@ 2004-07-30 12:20 ` Keletso Keletso
1 sibling, 0 replies; 8+ messages in thread
From: Keletso Keletso @ 2004-07-30 12:20 UTC (permalink / raw)
To: urgrue, admin
thanks for your help everyone, i have been able to set
the environmental variable for editor in .bash_profile
and it worked. I was able to create a test-schedule,
install it and it ran well. however i am not able to
edit it again. These are the steps i took:
1. As root i issued # crontab -u cronuser testcron
2. i # su cronuser and issued: $ crontab -e as
cronuser
3. i was able to edit the schedule: it opened as
/temp/cron.3214 or something. i saved it using the
same name.
4. by default the crontab was installed once i saved
it.
It ran on schedule and i wanted to go back and edit it
again. however once i tried opening it by issuing
crontab -e as cronuser it opened as an empty file.
with a different name. what could be the issue here?
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 9:13 ` Luca Ferrari
2004-07-29 10:53 ` urgrue
@ 2004-07-29 11:14 ` Keletso Keletso
2004-07-29 11:38 ` Luca Ferrari
1 sibling, 1 reply; 8+ messages in thread
From: Keletso Keletso @ 2004-07-29 11:14 UTC (permalink / raw)
To: fluca1978, linux-admin
Hi Luca, are you running fedora 2? I actually tried to
open the crontab using vi and it seems the default
editor for crontabs on my system is not set to vi. So
for example once the crontab has been opened i am not
able to save it using vi commands. so puting the same
exact line on .profile file should export an editor of
my choice. can i export nano?
--- Luca Ferrari <fluca1978@infinito.it> wrote:
> On Thursday 29 July 2004 11:04 Keletso Keletso's cat
> walking on the keyboard
> wrote:
>
> > Hopefully someone can offer assistance here. I am
> > trying to edit user-defined crontabs which stored
> in
> > /var/spool/cron using crontab -e. Now I am being
> > informed I cannot use vi to edit those crontabs
> and
> > instead must extract and export a different editor
> > (pref VISUAL). Could anyone assist me with the
> steps
> > (e.g. which env profile file must i change to make
> > this accomodation and what is the script code).
> >
>
> I'm using vi to edit crontab, but you can simply
> changing the editor doing:
> export EDITOR=emacs
> crontab -e
> that will start using emacs.
> You can add the export= line to you .profile (or
> .bash_profile) file. Why
> aren't you using vi? It's quite fast for editing
> crontabs....
>
> Luca
>
> --
> Luca Ferrari,
> fluca1978@infinito.it
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 11:14 ` Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
@ 2004-07-29 11:38 ` Luca Ferrari
2004-07-29 16:52 ` Glynn Clements
0 siblings, 1 reply; 8+ messages in thread
From: Luca Ferrari @ 2004-07-29 11:38 UTC (permalink / raw)
To: linux-admin
On Thursday 29 July 2004 13:14 Keletso Keletso's cat walking on the keyboard
wrote:
> Hi Luca, are you running fedora 2? I actually tried to
> open the crontab using vi and it seems the default
> editor for crontabs on my system is not set to vi. So
> for example once the crontab has been opened i am not
> able to save it using vi commands. so puting the same
> exact line on .profile file should export an editor of
> my choice. can i export nano?
At the moment no, I'm running the 1 and other suse systems. Nevertheless, what
does
echo $EDITOR
shows to you? It should be the editor used. You can export the editor you
want, but try to run it before editing the crontab to check it's working
well.
Bye,
Luca
--
Luca Ferrari,
fluca1978@infinito.it
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Setting the editor environment variable for crontabs in Fedora 2
2004-07-29 11:38 ` Luca Ferrari
@ 2004-07-29 16:52 ` Glynn Clements
0 siblings, 0 replies; 8+ messages in thread
From: Glynn Clements @ 2004-07-29 16:52 UTC (permalink / raw)
To: linux-admin
Luca Ferrari wrote:
> > Hi Luca, are you running fedora 2? I actually tried to
> > open the crontab using vi and it seems the default
> > editor for crontabs on my system is not set to vi. So
> > for example once the crontab has been opened i am not
> > able to save it using vi commands. so puting the same
> > exact line on .profile file should export an editor of
> > my choice. can i export nano?
>
> At the moment no, I'm running the 1 and other suse systems.
> Nevertheless, what does echo $EDITOR shows to you? It should be the
> editor used.
The crontab program probably uses $VISUAL in preference to $EDITOR.
Historically, $EDITOR would be used on a "dumb" terminal which didn't
support curses-style functionality (e.g. a hardcopy terminal), while
$VISUAL would be used on a terminal which was capable of supporting a
"visual" editor such as vi.
Nowadays, most programs take it for granted that all terminals are
capable of supporting a visual editor, and try $VISUAL first then
$EDITOR, regardless of the terminal type.
FWIW, most versions of vi fall back to behaving like ed if the
terminal doesn't provide the necessary functionality (e.g. cursor
positioning).
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-07-30 12:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-29 9:04 Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
2004-07-29 9:13 ` Luca Ferrari
2004-07-29 10:53 ` urgrue
2004-07-29 19:10 ` Scott Taylor
2004-07-30 12:20 ` editing crontabs Keletso Keletso
2004-07-29 11:14 ` Setting the editor environment variable for crontabs in Fedora 2 Keletso Keletso
2004-07-29 11:38 ` Luca Ferrari
2004-07-29 16:52 ` Glynn Clements
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).