I wouldn't rely on the "file" command to provide any definitive answer about the intended use or format of a file. It's notoriously inaccurate and IMO is more of a "hint" for interactive use then anything else.
Hi,
The ASCII code for group separator is 29. I have used this particular character to separate out two words. Actually it's a text file, holding all text data. Hence it should show as ASCII Text file by the file command. But it's recognized as data file due to group separator 29.
Please help me to find out a way, so that it could be recognized as Text file.
The definition of how file decides on filetype is:
The type printed will usually contain one of the words text (the file
contains only printing characters and a few common control characters and
is probably safe to read on an ASCII terminal), executable (the file con
tains the result of compiling a program in a form understandable to some
UNIX kernel or another), or data meaning anything else (data is usually
�binary' or non-printable). Exceptions are well-known file formats (core
files, tar archives) that are known to contain binary data.
from man file, q.v.
One could create one's own file command and add the GS control character as an exception -- I have not done it, but I think the file magic could be so changed. Otherwise, one could replace the GS (say with sed) to something innocuous before feeding the resulting copy of the data file to the file commend.
So you used a nonprinting char as a separator and wondered why file considered it to be nonprinting. Either configure file to your liking, or, don't do that...