Improvements in the handling of crontab comments
Improvements in the handling of crontab comments include appending all commented lines above a cron expression and discarding previous ones if there is an enter.
Works situations
#- - - * randomtext abc
#5 * * * * /home/ubuntu/teste.sh
#- - - * randomtext abc
5 * * * * /home/ubuntu/teste.sh
#- - - * randomtext abc
#5 * * * * /home/ubuntu/teste.sh
#- - - * randomtext abc
#5 * * * * /home/ubuntu/teste.sh
#- - - * randomtext abc
5 * * * * /home/ubuntu/teste.sh
# another comment
#- - - * randomtext abc
5 * * * * /home/ubuntu/teste.sh
Before:
header | header |
---|---|
After
header | header |
---|---|
Another example
#- - - * randomtext abc
#5 * * * * /home/ubuntu/teste.sh
#- - - * randomtext abc
5 * * * * /home/ubuntu/teste.sh
#teste abc
#\ * * * /home/ubuntu/kde/src/kcron/Messages.sh
#testes comentários
10 * * * * /home/ubuntu/kde/src/kcron/Messages.sh
Edited by Cássio Sousa