The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
newline character trichyselva UNIX for Dummies Questions & Answers 9 4 Weeks Ago 10:47 AM
Sed append newline character Gaurang033 Shell Programming and Scripting 3 06-26-2008 02:57 AM
Substituting carriage return followed by newline character - HELP djkane Shell Programming and Scripting 14 02-28-2006 06:58 PM
Newline character not working for ksh sanikv Shell Programming and Scripting 11 06-23-2005 10:34 AM
How can I replace newline character? ghoti UNIX for Dummies Questions & Answers 1 08-16-2001 09:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-10-2008
Registered User
 

Join Date: Jul 2008
Posts: 17
newline character, space and tab after a string

no problem

Last edited by angelina; 07-12-2008 at 07:36 AM. Reason: added code tags
Reply With Quote
Forum Sponsor
  #2  
Old 07-10-2008
Registered User
 

Join Date: Jul 2008
Location: Texas
Posts: 60
Since it's your input file that's messed up, why not just edit it and correct it? I think cat -evt will show you a little more info on what is actually in the file.
Reply With Quote
  #3  
Old 07-11-2008
Registered User
 

Join Date: Jul 2008
Posts: 17
I did fix it in vi .....thats not a problem ......but to automate it how do i work on it........plz suggest me .......

Last edited by angelina; 07-11-2008 at 07:47 PM. Reason: use code tags
Reply With Quote
  #4  
Old 07-11-2008
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 1,931
Try this:

Code:
perl -i.bak -0777 -ple's/(".*?)[\r\n]*(.*?")/$1$2/g' file

Last edited by radoulov; 07-11-2008 at 05:36 AM. Reason: added the g swith
Reply With Quote
  #5  
Old 07-11-2008
Registered User
 

Join Date: Jul 2008
Posts: 17
Hi rad,

I just copied ur command and pasted on the prompt.infact i used this

Last edited by angelina; 07-11-2008 at 07:47 PM.
Reply With Quote
  #6  
Old 07-11-2008
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 1,931
It's correct The above command modified your original file (backed up in input.csv.bak). You don't need to redirect ...
Reply With Quote
  #7  
Old 07-11-2008
Registered User
 

Join Date: Jul 2008
Posts: 17
wish u all the best. muaaaaaaaaaahhhhhhhhhh

Last edited by angelina; 07-11-2008 at 07:48 PM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0