10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My need is :
Want to change
docBase="/something/something/something"
to
docBase="/only/this/path/for/all/files"
I have some (about 250 files)xml files.
In FileOne it contains
<Context path="/PPP" displayName="PPP" docBase="/home/me/documents" reloadable="true" crossContext="true">... (1 Reply)
Discussion started by: linuxadmin
1 Replies
2. Shell Programming and Scripting
If the string is of the pattern XxxXyzAbc...
The expected out put from sed has to be Xxx Xyz Abc ...
eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs.
If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies
3. Shell Programming and Scripting
Hi all,
Sed is the one which always trobules me :(
here is my input :
*** it industry need to be evolved *** in the world and hope so *** to be dream
the output i am expecting is :
*** it industry need to be evolved
*** in the world and hope so
*** to be dream
... (4 Replies)
Discussion started by: panyam
4 Replies
4. Shell Programming and Scripting
hi,
when i am doing the following things getting error
Can anyone please suggest
i have a file where there is a line like the following
branch=dev sdf dev jin kilii fin kale boyle dev james dev
i want to search the existance of dev in the above line.
cat "$file" | sed -n... (8 Replies)
Discussion started by: millan
8 Replies
5. Shell Programming and Scripting
Hi all,
I have a script which uses sed to replace one string with another. The problem is, the string to be matched, and its replacement are coming in as two command line arguments $1 and $2
$1 and $2 can be absolutely anything, but both should be treated purely as strings. My sed command... (7 Replies)
Discussion started by: mark007
7 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have a script which uses sed to replace one string with another. The problem is, the string to be matched, and its replacement are coming in as two command line arguments $1 and $2
$1 and $2 can be absolutely anything, but both should be treated purely as strings. My sed command... (1 Reply)
Discussion started by: mark007
1 Replies
7. Shell Programming and Scripting
Hi,
I have a file with the path of the directory present somewhere in it.I have assigned the path of the directory name to a variable. I want to replace it with another string.The code i used was
sed -e '/$variable/sbcd/' filename.
since the path name includes slashes '/', my sed command... (9 Replies)
Discussion started by: ragavhere
9 Replies
8. Shell Programming and Scripting
I have three files that the string inside it I want to replace
so my code will be
#!/bin/bash
read -p "please input the old string:" string1
read -p "please input the new string:" string2
sed -i "s/string1/string2/g" *.c
but the problem is.. the string that I want to replace can't be... (2 Replies)
Discussion started by: Viken
2 Replies
9. Shell Programming and Scripting
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Discussion started by: amangeles
4 Replies
10. Shell Programming and Scripting
Hi,
I am new to using Sed. I have a file containg lines like the following:
INFORM----Test.pc:168:10/11/05 12:34:26 > some text goes here..
TRACE-----Test.pc:197:10/11/05 12:34:26 > some text goes here..
My requirement is to replace 10/11/05 12:34:26 with a string <RUNDATE> (including <... (4 Replies)
Discussion started by: Hema_M
4 Replies