On Mon, Sep 16, 2013 at 08:57:11PM +0200, Antoine Jacoutot wrote:
> > Any other thoughts?
> 
> Is there any way we could use something else than file(1) ?

Well, you can look for a script using dd and matching it against
the two possible signatures. e.g.,

dd 2>/dev/null if=file bs=4 count=1|grep -qe '#!/./ -e '#! /'

I'm not sure that's too much of a progress.

There might be another way to grab the first 4 bytes of a file.
Off-hand I don't see any.

Reply via email to