10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file, in which line 40 is commented. It is basically a cron job,
#05,35,50 * * * * /usr/local/scripts/my.sh
how i can i verify the line 40 is commented, if not then give me message not commented, otherwise provide us message it is commented. (5 Replies)
Discussion started by: learnbash
5 Replies
2. Shell Programming and Scripting
I need to insert a comment string to a couple of fields for every line in the file. Different comment string for each field.
In below file, fields 7 and 8
"R","1","t0000684","","10/31/2013","10/31/2013","","","","750.23"... (6 Replies)
Discussion started by: Melah Gindi
6 Replies
3. Web Development
I have set the sh file to chmod 755
i only able to print the output but cannot execute the copy why?
Below is the code for sh file
echo "Hello"
cp hello.sh helloworld.sh
Below is my code for php.
<html>
<head>
</head>
<body>
<?php echo '<p>Hello</>'; ?>
<?php shell_exec('sh... (4 Replies)
Discussion started by: zhengkoon8
4 Replies
4. Shell Programming and Scripting
Hi,
I am writing a shell script, which should comment a if-fi loop in a file.
From google i found that, we can use below qualifier to comment a section of code,
:<<COMMENT
COMMENT
But i could not place these keywords before and after if-fi loop.
Any help would be appreciated.
Finally the... (2 Replies)
Discussion started by: successlin
2 Replies
5. Shell Programming and Scripting
I want to comment 2 lines based on a condition. If THEN occurs immediately after WHEN then i have to comment both the lunes
For example :
$cat file1.txt
CASE
WHEN
THEN 1
WHEN
c1= 'I'
AND c2= '0'
THEN 2
So in this example i want to... (2 Replies)
Discussion started by: ashwin3086
2 Replies
6. UNIX for Dummies Questions & Answers
Is there a command to put a comment (#) in a whole part of a shell script? (5 Replies)
Discussion started by: vero_81
5 Replies
7. Shell Programming and Scripting
Hi,
My requirement is to comment/uncomment a cron job through a script.
1. Redirected the output of crontab -l to a text file.
crontab -l >cronoutput.txt
2. grep to find the script running and sed to place the comment (#) as
the first char
grep -i 'weblogicmonitor.sh'... (5 Replies)
Discussion started by: mannepalli
5 Replies
8. Shell Programming and Scripting
Hi guys, hope you scripting gurus here can help me out, the logic in my script somehow not working the way it should, this script part of a bigger backup script suppose to do some checking on the cluster prior to bringing up the package on MC/SG after backend cloning operation, this portion is... (3 Replies)
Discussion started by: sparcguy
3 Replies
9. Shell Programming and Scripting
SCO 5.06
Is there a variable that holds a user's comment?
In scoadmin -account, there's a comment field which we normally
populate with the user's name.
Or ... am I better off greping /etc/passwd?
Thanks! (2 Replies)
Discussion started by: gseyforth
2 Replies
10. UNIX for Dummies Questions & Answers
Hi guys and Gals AIX 5.1
If I had a # above several scripts would it comment out everything below it?
Like this
#
01 2 ** .....................................
02 31 .........................................
# this is a script
03 12 **..........................
Would... (6 Replies)
Discussion started by: rocker40
6 Replies