![]() |
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 |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| replace character in a string pattern and save the change in same file | mihir0011 | Shell Programming and Scripting | 2 | 09-26-2007 06:31 PM |
| replace a string with content from another file | afatguy | Shell Programming and Scripting | 4 | 09-14-2006 10:25 PM |
| replace a string in a file | ratan2204 | Shell Programming and Scripting | 7 | 05-10-2006 10:40 AM |
| Replace all occurances of a string in all file-/foldernames, recursively | TheMJ | Shell Programming and Scripting | 2 | 04-12-2006 02:40 AM |
| replace string in binary file | sg1207 | Shell Programming and Scripting | 2 | 07-29-2004 12:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Thanks for your reply.
When am using sed, the command is not replacing the string. sed -e 's/notes2/notes/g' expoutnotesall > outfile I used ed in HOME argument format also in scrip as ed $1 <<-EOT 1,\$s/notes2/notes/g w q EOT Can u tell me exactly how to use sed /perl here in shell scripts. |
|
||||
|
sorry, i cant give the contnent of input file.
This file contains the string "notes2" which has to be replaced by the string "notes". Since i was not able to open in vi editor, i cant give the input file. It is an export file produced by some command in our application which is in data file format. Using cat command i was able to view the file content. |
|
||||
|
Quote:
Code:
fold -80 filename |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|