The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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
removing special characters @ EOL ali560045 Shell Programming and Scripting 6 04-28-2009 07:50 AM
removing characters dr_sabz UNIX for Dummies Questions & Answers 2 01-05-2009 06:02 PM
Removing ^D and ^H characters arsheshadri HP-UX 1 06-26-2008 09:01 AM
Help with removing characters like ^M chiru_h Shell Programming and Scripting 16 02-13-2007 10:07 AM
Removing characters from end of $string craig2k Shell Programming and Scripting 3 03-25-2003 10:38 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-28-2009
infyanurag infyanurag is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 65
Removing ^M characters

hi

I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed.
Please help as how to get rid of these.
This conv.pl is going to get schduled in crontab so I will have to get it fix before hand only and not after log file is created.

$> conv.pl > a.log



Thanks
  #2 (permalink)  
Old 10-28-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,423
you can get rid of it using simple tr command

Code:
tr -d "\15"  < infile > outfile

  #3 (permalink)  
Old 10-29-2009
infyanurag infyanurag is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 65
Quote:
Originally Posted by vidyadhar85 View Post
you can get rid of it using simple tr command

Code:
tr -d "\15"  < infile > outfile
Thats right,
but this could be done after the log file has been created. I want a solution that it does not come in log file when i run my conv.pl file.
  #4 (permalink)  
Old 10-29-2009
pogdorica's Avatar
pogdorica pogdorica is offline
Registered User
  
 

Join Date: Oct 2009
Location: Madrid
Posts: 55
Quote:
Originally Posted by infyanurag View Post
Thats right,
but this could be done after the log file has been created. I want a solution that it does not come in log file when i run my conv.pl file.
Canīt you do this ?

$> conv.pl | tr -d "\15" > a.log
  #5 (permalink)  
Old 10-29-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,184
Did the file come from a Windows server? How was it copied?
  #6 (permalink)  
Old 10-29-2009
danceofillusion danceofillusion is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 14
Try transferring the file via acsii mode instead of binary.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0