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
Wordpad or Notepad? Heidi.Ebbs UNIX Desktop for Dummies Questions & Answers 12 05-21-2009 11:56 AM
Strange requirement!!! rahul26 UNIX for Advanced & Expert Users 1 08-19-2006 03:29 AM
Something strange... B14speedfreak SUN Solaris 0 06-29-2006 10:48 AM
strange skotapal UNIX for Dummies Questions & Answers 13 11-15-2002 12:16 PM
Strange Characters in Filename kristy UNIX for Dummies Questions & Answers 4 03-07-2002 06:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2006
dgower2 dgower2 is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 7
Strange Characters After Using Notepad

Hello all,

I'm new to UNIX and new to this forum, so forgive my lack of knowledge. I'm new with editing in vi so I FTP scripts to a Windows machine and edit the script in notepad (when I need to do something quickly). Sometimes when I FTP the script back to the UNIX box, strange characters appear in the script like "M-^?M". I don't see the charaters if I edit the script with vi after ftping it back to UNIX; I only see the characters when using the more command.

Any information/guidance is appreciated.

Dan
  #2 (permalink)  
Old 04-26-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
DOS files have carriage-control characters that are different from unix.
There are utitlities to handle this on the unix side, consult the man pages for:
dos2ux (sometime called dos2unix)
ux2dos (sometimes called unix2dos)
  #3 (permalink)  
Old 04-26-2006
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
Quote:
Originally Posted by dgower2
Sometimes when I FTP the script back to the UNIX box
Always use FTP ASCII mode to transfer text files in between Windows/DOS and any versions of Unix, including Linux; and BINARY mode in between Unix systems.
  #4 (permalink)  
Old 04-27-2006
dgower2 dgower2 is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 7
Thanks

Thanks so much for the replies. Much appreciated.
  #5 (permalink)  
Old 05-21-2009
SilversleevesX SilversleevesX is offline
Registered User
  
 

Join Date: May 2009
Location: Northeast USA
Posts: 48
dgower:

Follow me here.

BZT

Quote:
Originally Posted by dgower2 View Post
Hello all,

I'm new to UNIX and new to this forum, so forgive my lack of knowledge. I'm new with editing in vi so I FTP scripts to a Windows machine and edit the script in notepad (when I need to do something quickly). Sometimes when I FTP the script back to the UNIX box, strange characters appear in the script like "M-^?M". I don't see the charaters if I edit the script with vi after ftping it back to UNIX; I only see the characters when using the more command.

Any information/guidance is appreciated.

Dan
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 06:37 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