开发者

How to turn off line wrap in the Pico editor when performing 'crontab -e'

I am inserting a cron instruction via crontab -e, and Pico is the editor.

But the line I am inserting is going into wrap mode and I can't save my cron file, because the su开发者_运维知识库bsequent line is in violation of the time settings.

How can I fix this problem?


If you're using Bash, it's simple:

export EDITOR="pico -w"

Run this in the shell and do:

crontab -e


Try turning off line wrap:

% EDITOR="pico -w" crontab -e

You can also set this for each time you invoke pico/nano by editing your ~/.picorc or ~/.nanorc and entering:

unset fill
unset softwrap
set nowrap


Solved it.

I merely put my cursor at the first character of the 2nd (wrapped) line and hit the backspace key

That moved the line up and together with the 1st line.

Then cron compiled nicely

Thanks for everyone's help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜