![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep patterns - File | dhanamurthy | Shell Programming and Scripting | 1 | 05-08-2008 07:24 PM |
| How to cut multiple patterns from a file? | Vijay06 | Shell Programming and Scripting | 5 | 11-26-2007 05:38 PM |
| How to replace the string in unix file? | param_it | UNIX for Dummies Questions & Answers | 5 | 06-26-2007 06:06 AM |
| c++, design patterns and Unix | mihk | High Level Programming | 3 | 04-25-2007 11:02 PM |
| replace delimiter : with '\001' in unix data file | spandu | Shell Programming and Scripting | 4 | 04-25-2006 05:51 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi Friends,
well what i want to do is that suppose i have a file say like .... ronaldduckdancecoolman donaldmuckdancepooltactics fonaldguckdancetoolbutcomps .... okok i agree this is a ridiculous data for a file. :-) now i want that the characters in each line fromposition 16 to say 19 gets replaced by a particular string , in this case the charcters are cool pool and tool , so say i want is the follwoing output: .... ronaldduckdanceYYYYman donaldmuckdanceYYYYtactics fonaldguckdanceYYYYbutcomps .... or maybe it is possible that the case is that i want to replcae cool,tool and pool by word whose length is greate than the ones which are present say like .... ronaldduckdanceYYYYYYYYman donaldmuckdanceYYYYYYYYtactics fonaldguckdanceYYYYYYYYbutcomps .... and also suppose i want say that a particular word occurence in every line is replaced by some other word say like i have input file containing .... ronaldduckdanceYYYYman donaldmuckdanceYYYYtactics fonaldguckdanceYYYYbutcomps .... and i want the file to be manipulated as .... ronaldduckdanceXXXXman donaldmuckdanceXXXXtactics fonaldguckdanceXXXXbutcomps .... or say different lengths replacement like .... ronaldduckdanceXXXXXXXXman donaldmuckdanceXXXXXXXXtactics fonaldguckdanceXXXXXXXXbutcomps .... the bottomline being that there r 2 cases one being replacement being on base of position and the other being replaxcement on basis of certain pattern. HOW do i do this???? PLzzz help Regards Manish |
| Forum Sponsor | ||
|
|