10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers.
From
Defaults requiretty
To
#Defaults requiretty
I tried something like below but no luck: Please advise,... (3 Replies)
Discussion started by: prvnrk
3 Replies
2. AIX
I am trying to comment out the crontab entries using sed.
I want to comment it out for a particular environment say '/mypath/scripts/'.
Using the full path as pattern, it is working. but using variable it is not working. i have tried double quotes too. but no luck!
$ crontab -l
... (3 Replies)
Discussion started by: SKhan
3 Replies
3. Shell Programming and Scripting
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude.
File contents.
exclude
exclude=
hi I am excluded
excludes
excludes=
... (9 Replies)
Discussion started by: anil510
9 Replies
4. Shell Programming and Scripting
I have a requirement where I want to add a comment '#' in my crontab, run a process, than remove the '#' I added.
Example cron
#5,10 * * * * ls -lt /tmp
10,5 * * * * ls -lt /var
I would like to be able use sed or awk to add a '#' at the begining of each
line. After the command... (4 Replies)
Discussion started by: BeefStu
4 Replies
5. Shell Programming and Scripting
I am running a script remotely to do the following
1. Kill all processes by a user
2. Uninstall certain packages
3. FTP over a new file
4. Kill a ldap process that is not allowing my /devdsk/c0t0d0s7 slice to un-mount
5. Unmount /h
6. comment out the slice in vfstab
7. newfs the... (9 Replies)
Discussion started by: deaconf19
9 Replies
6. Shell Programming and Scripting
I'm trying to write a script to help automate some VERY tedious manual tasks.
I have groups of fairly large XML files (~3mb+) that I need to edit.
I need to look through the files and parse the XML looking for a certain flag contained in a field. If I find this flag (an integer value) I need... (4 Replies)
Discussion started by: J-Hon
4 Replies
7. Shell Programming and Scripting
Hi,
I would like to get rid of all comment in an xml file by grep or sed command:
The content seem like this:
<!-- ab cd
ef gh
ij kl -->
Anyone can help?
Thanks and Regards (3 Replies)
Discussion started by: RonLii
3 Replies
8. UNIX for Dummies Questions & Answers
I want to replace this line : "test compare visible] true" and make it "#test compare visible] true".
How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Discussion started by: manoj.b
6 Replies
9. Shell Programming and Scripting
Hello -
I am running Linux. I want to place a comment char at the beginning of a line in a file. For example:
testvar=`grep username /etc/people
sed -e 's/$testvar/#$testvar/g' /etc/people
I cannot get the above commands to put a comment at the beginning of the line.
Any... (3 Replies)
Discussion started by: mlike
3 Replies
10. Shell Programming and Scripting
Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Discussion started by: homefp
8 Replies