Setting the editor environment variable for crontabs in Fedora 2
Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 11:04:51 von tswanakeppler
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
-
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 11:13:50 von Luca Ferrari
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 12:53:25 von urgrue
> 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.
-
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 13:14:38 von tswanakeppler
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 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
-
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 13:38:26 von Luca Ferrari
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
-
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 18:52:46 von Glynn Clements
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
-
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
Re: Setting the editor environment variable for crontabs in Fedora 2
am 29.07.2004 21:10:28 von Scott Taylor
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
-
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
editing crontabs
am 30.07.2004 14:20:03 von tswanakeppler
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
-
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