![]() |
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 |
| 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 |
| How to insert carriage return before line feed? | huey ing | Shell Programming and Scripting | 2 | 08-05-2005 01:22 PM |
| Removing Carriage Return and or line feed from a file | tbone231 | Shell Programming and Scripting | 1 | 02-18-2005 04:37 PM |
| Remove a carriage return at end of variable | flagship99 | UNIX for Dummies Questions & Answers | 5 | 11-17-2004 06:39 PM |
| carriage return/line feeds | pitstop | Shell Programming and Scripting | 4 | 11-24-2003 03:47 PM |
| Regex to pick up name from the following including carriage return at end of the line | Shakey21 | Shell Programming and Scripting | 3 | 07-18-2002 08:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
To remove carriage return between the line
Hi,
I have a situation where I need to remove the carriage return between the lines. For.eg. The input file: 1,ad,"adc sdfd",edf 2,asd,"def fde",asd The output file should be 1,ad,adc sdfd,edf 2,asd,def fde,asd Thanks Shash |
|
||||
|
I am having problems if I use the files as my input.
The code I'm using is as follows: awk '/^[1-9]/{print ""} {gsub("\"", "") printf"%s ", $0} END{print ""}' book2.csv | sed 's/,$//' > book3.csv book2.csv contains data as follows: 1,ad,"adc sdfd",edf 2,asd,"def fde",asd 3,def,fde The output I'm getting as book3.csv ,ad,adc sdfd,edf ,asd,def fde,asd 3,def,fde 1 & 2 values are missing. Thanks Shashi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|