Dear All,
I have many cron entries and want to comment a particular cron entry from a script.
Ex- Suppose I have the below cron entries:
I want to comment the entry for asdg_count.sh from my script
I am using the below command:
But the command is not working
and I am getting the console message as :
and the message in temp.txt is :
Please help on commenting the cron from the script.
Thanks
AK
Last edited by Franklin52; 10-02-2009 at 04:33 AM..
Reason: Please use code tags!
It will work best for you.... instead of trying to do the edition with vim.
Also, note that, if some body else edits that crontab at the same time then you will end up in mess..
Dear All,
I have many cron entries and want to comment a particular cron entry from a script.
Ex- Suppose I have the below cron entries:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
#Cron entries for Jboss server 1
0 23 * * * /usr/bin/echo
0 23 * * * /usr/bin/asdg_count.sh
0 23 * * * /usr/bin/true
0 23 * * * /usr/bin/true
I want to comment the entry for asdg_count.sh from my script
Last edited by cfajohnson; 10-02-2009 at 01:44 PM..
Reason: Missing apostrophe added (thanks methyl)
In my cron thare is a line like
24 11 * * * /usr/batch/bin/abc.sh > /usr/batch/log/abc.log 2>&1
along with other entries. I want to comment out this line through a shell script. My local variable 'line'ontains the full entry (i.e. 24 11 * * * /usr/batch/bin/abc.sh > /usr/batch/log/abc.log... (4 Replies)
I have an xml file which has following code :
<abc-ref>
<abc-name>abc.efg.hij.klm</abc-name>
</abc-ref>
I want to comment this whole section out and I have written the following script : (where "hij" is unique string in the file)
TEMPFILE=replaceYY.tmp
file=hello.xml
sed -n... (6 Replies)
Hi All,
I know we can comment by using "#" .... I want to know... is there any way to comment a whole big script easily....
In a file i need to comment more than 15 lines ........ and check the script and un comment back.
I am learning VI now so its taking lot of time to comment and un... (4 Replies)
Hi All,
I am struggling to get my head around the following issue.
I am having to comment out lines between two delimiters by placing an asterix in position 7 but retain all lines in the file and in the same order.
so for example a file containing:
...
...
DELIM1
...
...
DELIM2... (2 Replies)
Hi
can any body pls help me :
I have a file Which Content is like following:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
ca:3:respawn:/opt/GoldWing/currentPM/local/critagt > /dev/msglog 2<>/dev/msglog
ca:3:respawn:/opt/GoldWing/currentPM/local/startcia.sh... (2 Replies)
HI all
I am working on a script, few details are as follows. I have one properties File and one script. The property file contains the JOBID which are to be executed and the Script runs these jobs ONE by ONE. After completing the JOB I need to comment that job in the property File. This is the... (3 Replies)
Hi all,
I m new for linux ... but now i will do this continuously. So my question is how to comment more then 1 line i dont wanna put # to each line.. my script is too big...
or u can tell me that how can i add # to sellected lines means if i wanna put # from line number 10 to 20 then how... (3 Replies)