![]() |
|
|
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 |
| how can awk match multi pattern in a string | sleepy_11 | UNIX for Advanced & Expert Users | 5 | 03-16-2008 11:40 PM |
| how to match an exact string of asterisks | lamilami | Shell Programming and Scripting | 8 | 11-27-2007 06:16 PM |
| Posix string to match [[0-999]] | Mair55 | UNIX for Dummies Questions & Answers | 11 | 10-16-2005 12:07 AM |
| substitute string according line number | nir_s | Shell Programming and Scripting | 4 | 07-19-2005 08:25 AM |
| Inserting new line after match of a fixed string | sunil_neha | Shell Programming and Scripting | 6 | 04-13-2004 12:09 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Match keyword on string and substitute under vi
Hi guys,
with sed when I need to make a substitution inside a line containing a specific keyword, I usually use: sed '/keyword/ s/cat/dog/g' This will substitute "cat" with "dog" on those lines containing "keyword". Now I want to use this inside vi, for several reason that I cannot explain, but I don't seem to find the right syntax. Has any of you shell wizards the proper syntax to use? Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|