![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| exact string match in a word | dr_sabz | UNIX for Dummies Questions & Answers | 11 | 12-15-2008 06:00 AM |
| Find exact string | Swapna173 | UNIX for Dummies Questions & Answers | 7 | 09-10-2008 05:17 AM |
| Find an exact string | gr8pals | SUN Solaris | 2 | 07-15-2008 07:17 AM |
| how to match an exact string of asterisks | lamilami | Shell Programming and Scripting | 8 | 11-27-2007 06:16 PM |
| sed problem - replacement string should be same length as matching string. | amangeles | Shell Programming and Scripting | 4 | 01-11-2006 06:11 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Exact String replacement with sed
Hi,
What should be the syntax to match and replace an exact string using sed? And not replacing any string that contain the value? Eg. testtest etstetst testetst testtttt etsttest testtesttest testtest I only want to replace the line with exact string "testtest" with "123456" The sed syntax I used was "sed 's/testtest/123456/g' temp1.properties" This way it replaced testtesttest as 123456test which is not a required result. Thanks in advance. Regards Eugene |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|