![]() |
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 |
| Can I use sed to insert a string which has colon | Jenny.palmy | UNIX for Dummies Questions & Answers | 2 | 04-28-2008 07:04 PM |
| How to insert a string at the end of a file read | ahjiefreak | Shell Programming and Scripting | 5 | 12-10-2007 11:38 PM |
| how to insert line break + string in vi (search & replace ) | umen | Shell Programming and Scripting | 1 | 06-08-2006 11:42 AM |
| Failed to insert string into file before line | nir_s | Shell Programming and Scripting | 7 | 07-26-2005 01:37 AM |
| vector<string> with insert cmd | photon | High Level Programming | 1 | 09-10-2004 05:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
PHP Code:
PHP Code:
I need sed script to do this, any one can help? Thanks |
|
||||
|
Thanks, Can i just get the "name" and set it to $name , so that I can reuse $name later
|
|
||||
|
You only have one "variable" in sed, which is called the "hold space". You can copy or append the current "pattern space" to the "hold space", or you can exchange the two, but inserting the contents of one in the middle of the other is difficult.
You would do much better with awk or perl or similar. |
|
||||
|
Quote:
there is a .sh file to do replacement.sed what i can do is to modify the replacement file. how can i use awk in .sed. Thanks |
|
||||
|
Sorry, I can't make sense of what you typed.
|
| Sponsored Links | ||
|
|