![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| sed substitution | som.nitk | Shell Programming and Scripting | 5 | 03-21-2009 11:39 PM |
| Substitution | Andyp2704 | Shell Programming and Scripting | 6 | 03-11-2009 07:35 AM |
| Difference between "Command substitution" and "Process substitution" | royalibrahim | Shell Programming and Scripting | 3 | 12-15-2008 11:20 AM |
| Need help in substitution!!!! | uLearner | UNIX for Dummies Questions & Answers | 3 | 03-06-2008 07:21 PM |
| ksh substitution | solea | Shell Programming and Scripting | 2 | 08-09-2004 05:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed substitution
Using sed I'm trying to replace 'string' with '[[string]]' while retaining case and ignoring words with 'string' in it along with additional characters like 'strings' and those which already contain the [[]] wrapper. I'm hoping to do it with sed and the right expression, if possible.
Example: Apple apple apples applet [[apple]] In this example I would only want to convert 'Apple' to '[[Apple]]' and 'apple' to '[[apple]]' ignoring 'apples', 'applet' and '[[apple]]. I can substitue Apple but I lose my 'A' as it's changed to 'a.' I'm attempting to autotag pages in my wiki so in the above example 'apples' and 'applet' don't represent existing pages and [[apple]] is already tagged. Any ideas or has anybody been down this path before and already know I'm chasing a phantom? Thanks |
![]() |
| Bookmarks |
| Tags |
| regular expression, sed, text manipulation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|