![]() |
|
|
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 |
| replace comma(,) with Tab | vikas_kesarwani | Shell Programming and Scripting | 3 | 11-14-2008 02:15 AM |
| vi or vim replace ,$ (eol) with just a comma | dbauhaus | UNIX and Linux Applications | 6 | 10-02-2008 10:02 AM |
| replace a newline (\n) | jeter | Shell Programming and Scripting | 3 | 05-18-2008 11:37 PM |
| sed utility to replace /307 with comma | obedkhan | UNIX for Dummies Questions & Answers | 1 | 02-06-2006 11:24 PM |
| How can I replace newline character? | ghoti | UNIX for Dummies Questions & Answers | 1 | 08-16-2001 01:49 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Replace comma with newline
Hi, for some reason I cant seem to figure this out. I have a file which looks something like this
word word word word word,word,word word word word,word,word,word,word word word Basically I want this whole thing to be a list with 1 word on each line like this... word word word word word . . . So my plan of attach was to use sed to replace the comma (,) with a newline like so: sed 's/,/\n/g' Which basically added a "n" where the comma was formerly. Any idea on how I can achieve my desired result? Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|