hi all,
i got crontab file like this:
50 1 * * * * /usr/local/bin/script1
50 2 * * * * /usr/local/bin/script2
50 3 * * * * /usr/local/bin/script3
..
..
.. and more.
question:-
1) how from shell script file, i add # to line 1 and line3 in first run?
2) remove # from line 1 and line 3
what i want is one script that check if line 1 and line 3 have comment (#). if got, the script remove the # and if no add the comment. 2 function in one script. can anybody help me on this? thanx in advance.
(maybe using sed or awk, either one)
i got crontab file like this:
50 1 * * * * /usr/local/bin/script1
50 2 * * * * /usr/local/bin/script2
50 3 * * * * /usr/local/bin/script3
..
..
.. and more.
question:-
1) how from shell script file, i add # to line 1 and line3 in first run?
2) remove # from line 1 and line 3
what i want is one script that check if line 1 and line 3 have comment (#). if got, the script remove the # and if no add the comment. 2 function in one script. can anybody help me on this? thanx in advance.
(maybe using sed or awk, either one)