line endings help of non-ASCII files

When you are dealing with ASCII files it easy to check on line endings type. You can just use the file command. You are not always lucky enough to be dealing with ASCII files. So in the cases that you don't have ASCII files how can you check what type of line endings you have? Please list all methods that you know of.

This doesn't really apply. In unix there are files. They are buckets of bits - nothing else. Period. The file command to some extent is there to keep windows users happy.

The dd command and some other utilities are there to help convert files to something that fits into the unix mindset.

here are some:

channel control words in MVS TSO

fortran carriage control files

VMS carriage control files with line descriptors

prime text files

12 bit byte file with Data General format headers, like "file" VTOC's.

carriage control files with either DOS or unix carriage control

fixed record length files with no carriage control

file descriptor controlled files (not a unix file descriptor, more like docx)

string-delimited files (nul marks the end of a line)

PDL defined files (page description language files like pdf, postscript, and HP PCL) where
records are not actually defined, except maybe by primitives like moveto.

binary files where word lengths or predefined records (structs) define "records".

The list goes on - pointlessly IMO. Any old stinker like me can come up with 'do you remember' file formats. I'd rather forget.

In other words, perhaps you need to rethink file structures. They are something we as people map onto data, the other way around is not really valid. Read the magic man page.

For certain things like shellscripts line endings are VERY important. Shellscripts will only work with LF and not CRLF line endings. I'm sure there are other things but that is the only thing I can think of off the top of my head.

That is not the point - the default carriage-control for unix is unix carriage control - what shell wants. If you use a windows editor with DOS-carriage control to create a unix shell file, then you have problems. If "you don't then you don't" Your choice.

I do not get your point re: your original question. File "types" are kind of an artifact, if you know what that is, of windows. Windows uses file types (extensions) to load applications. Unix developed that (gnome for example) to keep the windows people happy while they were on linux.

I am not assigning value to either position, just pointing out that in 1970's versions of unix it made no difference. Nowadays it does (obviously your post impled it does) - not because of unix so much - but because of windows-think imposed from windows -> unix, brought in by windows first, unix second users. That matches the definition of an articfact - some value induced not by the object itself; rather it is induced by the perception by humans of that object. It is not necessarily an innate property of the object.

My point is I have a very annoying file that pidgin needs work right. The file kept magically changing on its own. You can read about it here if your curious.
http://www.unix.com/unix-advanced-expert-users/149998-difference-between-two-files-almost-identical-files.html

I was hoping there was a easy way to check on file endings. File endings are VERY important in certain circumstances.

Pidgin, MSN and X509 certificates are problematic - lots of information on Web about the issues.