Is it possible to make ls distinguish executable scripts from actual compiled binaries?
The permissions are most often the same (+x), and with ls -F you get an asterisk suffix (*) for both, so it's hard to tell them apart. I have a script to setup the colors of ls, but it relies on the file being executable or not, so they show up the same:
BG='01;32' # green
EX="ex=$BG" # file with execute permission
I don't want to depend on the extension as so many of these files don't have it.
I want this so when I see some bizarre error message and think, "What code caused that?", I know whether or not it's safe to cat the file.
If there is no standard solution, what about parsing the output of file, in one common function, and inserting some distinctive mark? Or would that be much too slow for ls?

ls(#!probably means script,^?Eprobably means the start of a binary). How much of an effect this has probably depends on things like your file system and directory layout and whether you are using spinning disks or solid state, etc. If you do that you probably wantnoatimeorrelatime. I think it would be much easier to just runfilemanually on the few files you want to inspect, unless you truly want to do this for everyls. – jw013 Nov 6 '12 at 19:36cat, and notls? I could call itctor something similar so it won't interfere with other use ofcat. – Emanuel Berg Nov 6 '12 at 19:55catwith a shell function that checks if it's a binary file first and warns before outputting to a terminal. I thinklessalready does this check. – jw013 Nov 6 '12 at 20:04