10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I got test.test.test and need
test.test\.test *
I need the backslash before the last dot in the line
I tried
echo test.test.test | sed 's/\./\\./g'
but it gives me
test\.test\.test
Thanks (7 Replies)
Discussion started by: stinkefisch
7 Replies
2. Shell Programming and Scripting
How can I replace the follong text including to number 7000?
cat tmp0.txt
Winston (UK) Wong
I would the 7000 to replace Winston (UK) Wong.
I fail with method below:
sed ' s /Winston\(UK\)Wong/7000 tmp0.txt' (1 Reply)
Discussion started by: vivien_chu
1 Replies
3. Shell Programming and Scripting
I have the replace the pattern in the file , ); to );
Could someone please help me to get this command. (2 Replies)
Discussion started by: mohan.bit
2 Replies
4. Shell Programming and Scripting
I need to do the following:
text in the format of: ADDRESS=abcd123:1111
- abcd123:1111 is different on every system.
replace with: ADDRESS=localhost:2222
sed 's/ADDRESS=<What do I use here?>/ADDRESS=localhost:2222/g'
Everything I've tried ends up with:
... (3 Replies)
Discussion started by: toor13
3 Replies
5. Shell Programming and Scripting
Greetings,
I am doing something that I don't know if it is possible...
I have a file with a line looks like this:
<%s \n%s / %s \n%s \n>
and I am trying to replace this line with
<%s \n%s \n%s / %s \n%s \n>
in Shell script with sed command...
StringToReplace='%s \n%s / %s \n%s \n'... (2 Replies)
Discussion started by: wasabihowdi
2 Replies
6. Shell Programming and Scripting
HI all,
How can i rename some files and replace the special character in the name with todays date
ex: Name#file1.txt
Name#file2.txt
to be renamed as
Name.20091119.file1.txt
Name.20091119.file2.txt (11 Replies)
Discussion started by: abhinav192
11 Replies
7. Shell Programming and Scripting
Hello,
I have a file with many lines with below format:
\abc\\1234
jkl\\567
def\\345
\pqr\\567
\xyz\\234
Here, i need to do 2 things.
1. replace \\ with \
2. remove starting \
so output to be as below: (11 Replies)
Discussion started by: prvnrk
11 Replies
8. Shell Programming and Scripting
Hi
I want to replace ./testsed.ksh
with
testsed.ksh
./ is to be removed
scriptnm=`sed -e 's/\.///' $0
does not work
Please help (3 Replies)
Discussion started by: usshell
3 Replies
9. Shell Programming and Scripting
I have a script that is reading an existing report, pulling out the customer code, then tacking on the customer name from another file and replacing the existing customer code with the new field. This was written for me by someone else. I'm not real familiar with sed.
The data is getting into... (3 Replies)
Discussion started by: MizzGail
3 Replies
10. Shell Programming and Scripting
the problem is while replacing the old string with new one with the help of SED i am unable to replace the special characters with new strings. how can i do that?
i dont want the user to be given the trouble to write '\' before every special characters like * , . , \ , $ , &.
sed... (4 Replies)
Discussion started by: imppayel
4 Replies