30 Sep, 2006, Tijer wrote in the 1st comment:
Votes: 0
Im having some issues with my new server i am hosted with….

Usually i type VISUAL=pico
export VISUAL to change the editor for crontab from vi to pico, but this isnt working.

Anyone know any other way to do this? This has worked on every other mud server i have ever used. so im unsure as to why it wont work on my current one.

Tijer
30 Sep, 2006, Brinson wrote in the 2nd comment:
Votes: 0
Never used pico. I use WinScp to edit files on my servers.
30 Sep, 2006, Conner wrote in the 3rd comment:
Votes: 0
Have you tried "crontab -e pico"? Or, if that fails, try setting the EDITOR variable instead of the VISUAL one?
30 Sep, 2006, kiasyn wrote in the 4th comment:
Votes: 0
i was too lazy to figure this out so i pico'd a file with my crontab stuff and did crontab <file>
30 Sep, 2006, Guest wrote in the 5th comment:
Votes: 0
crontab -e usually defaults to vi
30 Sep, 2006, Conner wrote in the 6th comment:
Votes: 0
kiasyn said:
i was too lazy to figure this out so i pico'd a file with my crontab stuff and did crontab <file>

That should work too. :lol:
30 Sep, 2006, Conner wrote in the 7th comment:
Votes: 0
locke said:
crontab -e usually defaults to vi


crontab -e will use what ever editor either the VISUAL or EDITOR environment variable points to.

The man page for crontab says:
Quote
The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically.
01 Oct, 2006, Guest wrote in the 8th comment:
Votes: 0
Yes, but this usually means vi (default) or the editor established by the system administrator, which may mean nano, pico or vi, but could mean emacs, or any other editor / interface (even 'edit').
01 Oct, 2006, Conner wrote in the 9th comment:
Votes: 0
locke said:
Yes, but this usually means vi (default) or the editor established by the system administrator, which may mean nano, pico or vi, but could mean emacs, or any other editor / interface (even 'edit').


So, short of editing a file in your editor of choice and then executing crontab <file>, what alternative does the original poster have? Being my own system admin, setting one of those environment variables suffices for me.
01 Oct, 2006, Guest wrote in the 10th comment:
Votes: 0
He can't just upload the crontab unless he's got root access, but beyond that, its better to just use the crontab command.
01 Oct, 2006, Conner wrote in the 11th comment:
Votes: 0
So, basically, in his case, the best alternative is going to be learn Vi well enough to get through what he needs to for crontab? :lol:
01 Oct, 2006, Guest wrote in the 12th comment:
Votes: 0
Yep. Here are some tips:
Quote
ESC+:+write to save
ESC+:+quit! to quit immediately
Ctrl-I to "insert" – once you are in "insert" mode it works like a normal editor, except only on that one line. Hit ESC again to return to a normal mode.


vi - it sucks
01 Oct, 2006, Guest wrote in the 13th comment:
Votes: 0
"As editors go, 'vi' is the heart of 'evil'. Ponder that."

Something lame I thought up one day :P
01 Oct, 2006, Guest wrote in the 14th comment:
Votes: 0
And vim is the heart of …
01 Oct, 2006, Tijer wrote in the 15th comment:
Votes: 0
Thanks for all your help guys… Sorted it.. had to use vi *cringe* as i couldnt change the editor of the crontab :)

Tijer
01 Oct, 2006, Guest wrote in the 16th comment:
Votes: 0
np :cyclops:
01 Oct, 2006, Conner wrote in the 17th comment:
Votes: 0
tijer said:
Thanks for all your help guys… Sorted it.. had to use vi *cringe* as i couldnt change the editor of the crontab :)

Tijer


Glad to have been of assistance, Tijer. While you're cringing about having to use VI though, I would think for a simple crontab entry you wouldn't need to do very much in VI anyway. Just once it opens, hit i then type in like you would in any other editor, once it's done, hit Esc and type :w hit Enter then type :q and hit Enter. *shrug*
0.0/17