Re: how to use crontab and cron.daily

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nigel henry wrote:
> 
> Ok. Just ran crontab -e, and again have got my newly created crontab, but 
> using vi, so presumably export EDITOR=nano was a one shot thing. I have the 
> vi cheat sheet, but I think you have to be using it all the time to get 
> really used to working with it, and probably the same goes for emacs. I don't 
> use text mode text editors much, and nano is for me the easier to use. I'll 
> edit ~/bash_profile and set nano as the editor to be used.
> 
When you use export <variable>=<value> it only has affect in the
current secession. If you us it in a terminal, it only affects that
terminal, and is gone when you close the terminal. If you do it at
the CLI, it only affects that login secession.

In this case, if you open a terminal, or log in to the command line,
and run "export EDITOR=nano", then anything that uses the EDITOR
variable to decide what editor to use will use nano. But if you use
"su -" to change users, or log in on another VC, it will not be
affective. The change is also lost when you log out, or close the
terminal. Setting EDITOR affects more then just "crontab -e".
Commands like vipw and vigr also use it. There are others, but those
are the two that come to mind.

Also, if you are using a terminal under X, you can also use X based
editors like Kedit in place of Nano. If you really wanted to get
fancy, you could write a script that uses the TERM variable to
decide what editor to launch. (Ether EDITOR points to the script, or
the script is run in .bash_profile to set EDITOR when the shell starts.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux