The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Catching ctrl-C or ctrl-D sendhilmani123 Shell Programming and Scripting 2 05-02-2006 05:02 PM
Disable ctrl-c,ctrl-d,ctrl-d in ksh script wtofu AIX 6 06-29-2005 04:41 PM
my ctrl+c doesn't work yankee428 UNIX for Dummies Questions & Answers 3 06-02-2005 01:35 PM
Enabling Ctrl-c Corewin UNIX for Dummies Questions & Answers 3 01-31-2002 11:30 AM
Script ctrl+c newtounix UNIX for Dummies Questions & Answers 1 03-19-2001 05:23 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-04-2008
navi navi is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 12
Ctrl-M at end of each line

I have a write a script in VI editor.whenever i open the Vi script ,it is showing ctrl-M at the end of each line.

Please tell me how to remove this Ctrl-M from each line.

Thanks in Advance
  #2 (permalink)  
Old 06-04-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,257
Code:
cat yourfile | tr -d '\015' > newfile
  #3 (permalink)  
Old 06-04-2008
navi navi is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 12
Thanks for replying. It is working fine
  #4 (permalink)  
Old 06-04-2008
meen_arora meen_arora is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1
You can also use dos2unix command

dos2unix original_file > new_file

Quote:
Originally Posted by navi View Post
I have a write a script in VI editor.whenever i open the Vi script ,it is showing ctrl-M at the end of each line.

Please tell me how to remove this Ctrl-M from each line.

Thanks in Advance
Sponsored Links
Closed Thread

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 11:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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