![]() |
|
|
|
|
|||||||
| 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 |
| how can i replace "(", "\" "+" in a file | mail2sant | Shell Programming and Scripting | 3 | 04-22-2008 08:10 PM |
| Sed , Replace a "variable text" inside of a statement | jackn7 | Shell Programming and Scripting | 4 | 03-04-2008 11:40 AM |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 11:00 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 09:52 PM |
| deleting newline characters but not the "true" \n character | caddyjoe77 | Shell Programming and Scripting | 1 | 08-15-2007 07:21 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
How to replace newline "\n"
How do I replace the newline character in "vi" editor.
I want to replace the string " \n" (ie, Blank followed by NewLine) with " " . How do I do this? I want to try this from vi editor and then using "sed". Thanks, |
| Forum Sponsor | ||
|
|
|
|||
|
NewLine
What i interpreted from your question is that you have a file in which the text is somewhat as shown
\n sdsdjfsjnfj \n asdmkasmdkamdk \n sdmfksdmfksd \n \n masdkak \n \n and now you want to replace the " \n" with "" so you can try the search and replace command i.e :%s/ \\n//g I tried this on solaris and it worked fine. |