On Tuesday, 19 October 2004 00.52, Paul W. Abrahams wrote:
On Monday 18 October 2004 11:53 am, Danny Sauer wrote:
Wouldn't it be easier just to run "crontab -e", which starts up the editor specified by $EDITOR, rather than starting up the editor, saving a file, and then running crontab on that file? Seems like you're adding some extra steps to the process...
I'm a little confused about how "crontab -e" works. The man page for crontab(1) says:
The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables.
What if VISUAL and EDITOR specify two different editors? Why are there two knobs on the same control, I wonder?
Historically it's not the same control. VISUAL is supposed to be a full screen editor like vi or pico, while EDITOR is a line editor like ed. Nowadays I guess they're both there for historical and compatibility reasons
By the way, I did a little experiment with EDITOR and discovered that it's effective as an environment variable only if it's exported.
It isn't an environment variable if it isn't exported. If you don't export it, it's only visible to the current process and isn't inherited when you launch a new process