02-20-2009
Search and replace error
Hi,
I need a command to search and replace the string, dlp040 to mld200 in multiple html files. I used the following command but it doesnt work
sed s/"dlp040 "/"mld200 "/g *
Please help,
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hello,
How to search a Word in a shell file and if that exists echo that the word exists and stop that operation and if that doesn't exists then echo word not found.
Thanks in advance.
Bye (4 Replies)
Discussion started by: mukeshannamalai
4 Replies
2. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
3. Shell Programming and Scripting
Hi,
I have a file that looks like the following:
M00071.null T
12 13 1 0 0
SMALL
M00074.null T 1
15 14 0 0 0
SMALL
M14870.null T 2 15431
15 17 0 1 0
SMALL
I want to edit it such that it looks like the following:
M00071
12 13 1 0 0
SMALL
M00074 (5 Replies)
Discussion started by: mjoshi
5 Replies
4. Shell Programming and Scripting
I have a script which has several occurences of statement like
command: $UCMDPATH/xyz abc
I would like to replace the entire line starting from $UCMDPATH with the ls -ltr command
eg:
Prior to change::
command: $UCMDPATH/xyz abc
After change:
command: ls -ltr
Is there a way to do... (12 Replies)
Discussion started by: jobbyjoseph
12 Replies
5. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
6. Shell Programming and Scripting
Hi,
I am having trouble with searching for a name and replacing it. The file is tab deliminated.
Basically I want to replace >ref|NC_001147| and >ref|NC_001148| with chr1 and chr2 respectively.
Here is what my file looks like:
>1_1_120_317 S OXTGHFKDK ... (2 Replies)
Discussion started by: phil_heath
2 Replies
7. Shell Programming and Scripting
Dear All,
i want to search particular string and want to replance next line value.
following is the test file.
search string is
tmp,???
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I am editing a config file in vi that has a / on it.
At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g
For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Discussion started by: newbie_01
2 Replies
9. Shell Programming and Scripting
Hi,
Basically , i search for a string ( from variable) in a input file , if line found then search a string called "STRING" and replace with text (from another variable ). I cant avoid # delimiter due to esc sequences.
#!/bin/bash
LINE="source/path"
REPLACE="TEXT/TO/REPLACE"
sed -e... (9 Replies)
Discussion started by: greet_sed
9 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to unix, please help me in this.
I have a file named properties.
The content of the file is :
##Mobile props
east.url=https://qa.east.corp.com/prop/end
west.url=https://qa.west.corp.com/prop/end
south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies