10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i'd like to modify a file with sed , i want to substuite a char "-" with "/"
how can i do this?
Thanks for all
Francesco (16 Replies)
Discussion started by: Francesco_IT
2. Shell Programming and Scripting
I have a requirement which needs to pass a parameter when calling the script, using this parameter to find a file name stored in master file. then read the file content. the issue is in the file name has a special character "$". don't know how to handle this. below is example:
the... (10 Replies)
Discussion started by: green_k
3. Shell Programming and Scripting
I got test.test.test and need
I need the backslash before the last dot in the line
echo test.test.test | sed 's/\./\\./g'
but it gives me
Thanks (7 Replies)
Discussion started by: stinkefisch
4. Shell Programming and Scripting
How can I replace the follong text including to number 7000?
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
5. 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
6. 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
7. Shell Programming and Scripting
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
8. UNIX for Dummies Questions & Answers
im having trouble doing this:
i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba
is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's?
im guessing its like getting the 1's compliment of the string
im doing this in... (2 Replies)
Discussion started by: vipervenom25
9. Shell Programming and Scripting
I want to replace ./testsed.ksh
./ is to be removed
scriptnm=`sed -e 's/\.///' $0
does not work
Please help (3 Replies)
Discussion started by: usshell
10. 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