![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | 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 !! |
|
|
||||
| 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 02:31 PM |
| replace a string with content from another file | afatguy | Shell Programming and Scripting | 4 | 09-14-2006 06:25 PM |
| replace a string in a file | ratan2204 | Shell Programming and Scripting | 7 | 05-10-2006 06:40 AM |
| Replace all occurances of a string in all file-/foldernames, recursively | TheMJ | Shell Programming and Scripting | 2 | 04-11-2006 10:40 PM |
| replace string in binary file | sg1207 | Shell Programming and Scripting | 2 | 07-28-2004 08:26 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
Am getting "Line too long" error in opening a file using vi editor but it is opening using cat. How can i edit the file to replace some string in it. Thanks |
| Forum Sponsor | ||
|
|
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |