Strange Characters After Using Notepad


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Strange Characters After Using Notepad
# 1  
Old 04-26-2006
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  
Old 04-26-2006
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  
Old 04-26-2006
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  
Old 04-27-2006
Thanks

Thanks so much for the replies. Much appreciated.
# 5  
Old 05-21-2009
dgower:

Follow me here.

BZT

Quote:
Originally Posted by dgower2
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Strange characters in FORTRAN code output

Hi guys, After compiling a .f90 code and executing it, i get strange characters in the output file like : ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ Are these windows characters? how can i get rid of this? Much appreciated. Paul (1 Reply)
Discussion started by: Paul Moghadam
1 Replies

2. Windows & DOS: Issues & Discussions

UNIX and notepad++

I connect to my office server using ftp option in notepad++ I am not able to open directory's with out setting my clear case view in the notepad++ Hence pls help me in setting the view in notepad++ so that it can read all the files and directorys (6 Replies)
Discussion started by: Syed Imran
6 Replies

3. UNIX for Dummies Questions & Answers

Formatting from Notepad++ to Vi

Hi, just quick question, I currently type up my scripts in Notepad++ and then copy them into my file (in VI). However, i've noticed that all the lines get messed up and it becomes difficult to read the script. so i've to spend time then using '\' at the end of lines etc and re-formatting... (7 Replies)
Discussion started by: horhif
7 Replies

4. Hardware

Strange Characters from ILOM

Hello, I have an x86 server with an ILOM connection that produces strange characters when I perform a start /SP/console, see below: Oracle(R) Integrated Lights Out Manager Version 3.0.16.10.a r68533 Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. -> start... (9 Replies)
Discussion started by: kerrygold
9 Replies

5. Red Hat

Spanish Characters get converted in strange chrac

I am trying to sftp a textfile from windows to linux. The file includes some spanish characters. When I vi the file in LINUX, the special (spanish) characters get converted into some strange characters. anyone know how i can resolve this? for example México gets converted into México on LINUX. (0 Replies)
Discussion started by: mrx1350
0 Replies

6. Shell Programming and Scripting

Grep a file that may contain strange characters

Hello unix users :) I am trying to grep a string from a file that both the file and the string may have characters in them that are quite... strange, like würzburger. Well, bash reads this as W%C3%BCrzburger For example, if i do wget W%C3%BCrzburger the output is: --2012-01-08... (2 Replies)
Discussion started by: hakermania
2 Replies

7. Shell Programming and Scripting

awk filelist containing strange characters

I've written a script: find -depth | awk ‘ { if ( substr($1,length($0)-2,3) == “/1.” ) { print $1 } { system(“awk -f test1.awk “ $1 ) } } ‘ The idea is that it trundles through a large directory structure looking for files which are named '1.' and then... (3 Replies)
Discussion started by: nashcom
3 Replies

8. UNIX Desktop Questions & Answers

Wordpad or Notepad?

I am new to using UNIX and after uploading a new script to UNIX from Windows using FTP, the script doesn't always work. It seems this depends on the text editor I use and the transfer type. I understand all scripts should be transferred using ASCII, but can you advise which is the best text editor... (12 Replies)
Discussion started by: Heidi.Ebbs
12 Replies

9. Shell Programming and Scripting

Lines with strange characters and sed...

Dear All: I Have a bunch of files which I'd like to process with a shell script. The problem is that the files have strange characters in their headers, like �g�8@L-000-MSG2__-ABCD________-FIRA_____-000001___-200806181330-__ ��e� Data from BLABLABLA, Instrument: BLABLA, Date:... (4 Replies)
Discussion started by: luiscarvalheiro
4 Replies

10. UNIX for Dummies Questions & Answers

Strange Characters in Filename

Hi folks. None of the conventional methods are working for my dilemma: I have a file in my root directory that has a name comprised of strange characters. When I do an ls, it just hangs at that file until I do a Cntrl-C. rm ./filename & rm \filename do not work. I am entering the... (4 Replies)
Discussion started by: kristy
4 Replies
Login or Register to Ask a Question