![]() |
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 |
| how to split special characters "|" using awk | krishna9 | Shell Programming and Scripting | 3 | 05-22-2008 06:30 AM |
| perl split funciton - special character "/" | deepakwins | UNIX for Dummies Questions & Answers | 5 | 02-08-2008 12:19 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| extran NUll character added after end of line "\n" | arunkumar_mca | UNIX for Dummies Questions & Answers | 1 | 11-12-2007 01:23 PM |
| How to replace newline "\n" | gsprince | UNIX for Dummies Questions & Answers | 5 | 06-09-2001 06:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
deleting newline characters but not the "true" \n character
hi, i have a file that has about 4500 rows. this was an old microsoft access databse and what i am trying to do is take out the old extra \n newline characters but not take out the "true" newline character. I will explain.
i was trying to write a regular expression, but that was not working so i thought PERL would be the best option. The collums are seperated by commas. Here is the dataset that i am working against. 144,20050892.0, Replacement of IN-FOCUS projector-Bldg 123, Replace malfunctioning In-Focus projector with new one.,- In-Focus projectors are used to project slideshows and other pertinent data to fron mountred screens. - Intermittent power up problem, kicks on and off. This project was originally in Sept 2001. - Bulbs have been replaced when it does work it is barely readable.,Infocus LP 640 XGA LCD Multimedia Projector $1699 EA www.infocus.com,2005-09-29 00:00:00,2005-10-29 00:00:00,Joe Blow user my phone number 5551212,5,0,3,None,,1,2005-10-12 00:00:00,C Pretty much i need to remove the extra \n newline characters without removing the end one. This is what the dataset should look like. 144,20050892.0, Replacement of IN-FOCUS projector-Bldg 123, Replace malfunctioning In-Focus projector with new one.,- In-Focus projectors are used to project slideshows and other pertinent data to fron mountred screens. - Intermittent power up problem, kicks on and off. This project as originally in Sept 2001. - Bulbs have been replaced when it does work it is barely readable.,Infocus LP 640 XGA LCD Multimedia Projector $1699 EA www.infocus.com,2005-09-29 00:00:00,2005-10-29 00:00:00,Joe Blow user my phone number 5551212,5,0,3,None,,1,2005-10-12 00:00:00,C The fist column, in this case is 144, and they are numbered sequentially. So the next one would be 145. can i do this with standard UNIX regular expressions or would PERL be better? Thanks |
![]() |
| Bookmarks |
| Tags |
| regex, regular expressions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|