![]() |
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 |
| 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 |
| replacing multiple lines with single line | siba.s.nayak | Shell Programming and Scripting | 3 | 05-28-2008 02:43 AM |
| Splitting the line in multiple lines | dd_sh | Shell Programming and Scripting | 3 | 03-31-2008 01:54 PM |
| using tr to put multiple lines of output into one line | otes4 | Shell Programming and Scripting | 3 | 02-18-2008 11:30 AM |
| Split data into multiple lines | kingofprussia | UNIX for Dummies Questions & Answers | 5 | 07-31-2007 01:48 PM |
| Splitting a single line into multiple lines | thanuman | Shell Programming and Scripting | 4 | 02-23-2005 04:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Split a huge line into multiple 120 characters lines with sed?
Hello ,
I'm trying to split a file which contains a single very long line. My aim is to split this single line each 120 characters. I tried with the sed command : `cat ${MYPATH}/${FILE}|sed -e :a -e 's/^.\{1,120\}$/&\n/;ta' >{MYPATH}/${DEST}` but when I wc -l the destination file it is still a 1 line file hu. my original file is a 0 line file as it doesn't contain any CR/LF. Can some one help me with this sed syntax to make it work pls? Thanks in advance! Jerome. |
|
||||
|
Thanks a lot for this command vgersh99!
I never heard about it ^^ It works perfectly! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|