In Linux both a binary executable file and a script can be marked "executable". I would like to determine in my gcc program whether the file is a script or a binary executable.
I read that there is an a.out.h file which allows to analyse the header of the file but I do not know how to use this in my code. Or if there is a simple solution instead.