![]() |
|
|
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 |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 09:29 AM |
| adding a line to a file | andy2000 | Shell Programming and Scripting | 2 | 03-26-2007 09:44 AM |
| adding spaces to a line | mgirinath | Shell Programming and Scripting | 4 | 03-23-2007 12:38 PM |
| Stop awk adding a new line | TobyR | Shell Programming and Scripting | 1 | 06-18-2006 12:30 PM |
| adding line terminator | thanuman | UNIX for Dummies Questions & Answers | 1 | 02-24-2005 07:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed - adding new line
I want to use sed to look for spaces in text and when find one move the next word to the next line.
I used: sed 's/ /\n/g' out > new However when there is more than one space between two words it adds more lines between them. And I just want the words to be one under another. How can I change that? Thanks I find out how to do this: sed '/^$/d' However when I'm using emacs and put this two commands in one line they don't want to work: #! /bin/bash sed 's/ /\n/g' | sed '/^$/d' out > new What I'm doing wrong??? Last edited by sovixi; 10-08-2007 at 08:56 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|