In fact transferring the file in ASCII mode should handle the line ending conversion during the transfer for you. It might (but most likely won't) make other changes, too, if the file contains special characters, but if as you say it's basically ASCII text, then transferring it in ASCII mode is really all it takes.
There are various tools to look at the raw bytes in a file; one of the purposes of a hex editor is to be able to inspect the precise bytes in a file so you can spot e.g. line ending anomalies. The control character ctrl-J is called a "line feed" and is used to end a line on Unix systems (and thus on the hosting account you are using) whereas on legacy DOS-based systems you use two characters, a sequence of ctrl-M (carriage return) and line feed. In a hex editor, they will show up as 0D and 0A, respectively.
Here's a hex dump of a fragment of text just to show you an example. You can see how each pair of hexadecimal (base-16) digits on the left correspond to one ASCII character on the right; for example, hex 65 is lower case "e".
The convention to use hexadecimal (base 16) instead of the familiar base 10 (decimal) is a convenience; it means that all possible byte values can be represented with exactly two digits, and important "computer" numbers -- factors of two -- are easy to spot. Character codes below 32 (hex 20, the space character) are conventionally called "control characters"; this goes way back to the early formation of character sets in the 1950s and ASCII in the 1960s.
Hey,
I'm trying to install a java web archive on unix but all the jsp's are in windows text format. I need to convert them all to unix text at once but I really don't want to do that on a file per file basis so I need to loop over all text files in all subdirectories and change the ^M. Does... (4 Replies)
I am trying to FTP a text file from a machine running LynxOS and I am having problems with the way windows "sees" the characters. For example this is how windows presents the text:
DevProcRcpClass
The boxes are what I am having problems with. When viewing the same file on a... (3 Replies)
I ran a search for "Unix Dos" in the search field box and checked a few pages' results but did not find what I was looking for. I am trying to find out if there are choices of applications that would enable using Unix commands inside a Windows environment, particularly the DOS Prompt. The only... (2 Replies)
Hi,
Need help on windows text file that i get in unix server and need to change and resend for process.
Now there is a ^M will be placed for each line of that file i need that to be removed .
Someone please help me.
Thanks in advance for all help. (1 Reply)
We are running a java client server application on Solaris 10. External Users from around the country attach windows files through a client and these files are stored on a unix server. Recently I've started getting files that have a hex value of ad in their names. This causes a tar command to... (5 Replies)
Hi Team,
The content of the file is as follows.
asdf
234
asdf
asdf
dsfg
gh
67
78
The file is in DOS format (not in Unix Format). The file is transferred to Unix. I need a unix command to check the number of blank lines in a input (comming from Windows). If it is greater than... (4 Replies)
Hmmm I think I found the correct subforum to ask my question...
I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this?... (1 Reply)
Hi all,
I have some text files that I prepared in vi some time ago, and now I want to open and edit them with Windows Notepad. I don't have a Unix terminal at the moment so I need to do the conversion in Windows. Is there a way to do this? Or just reinsert thousands of line breaks again :eek: ? (2 Replies)