Description of problem: file reports "awk script text" even if script starts with #!/usr/bin/perl example: [root]# file /usr/bin/spamd /usr/bin/spamd: awk script text [root]# head -n 1 /usr/bin/spamd #!/usr/bin/perl -T -w [root]# egrep -n BEGIN[[:space:]]*[{] /usr/bin/spamd 27:BEGIN { # added by jm for use inside the distro 69:BEGIN { Version-Release number of selected component (if applicable): file-4.17-2.fc5 spamassassin-3.1.3-1.fc5 How reproducible: file on perlscripts which use "BEGIN {" also seen at perl scripts from twiki Steps to Reproduce: 1. file /usr/bin/spamd 2. 3. Actual results: /usr/bin/spamd: awk script text Expected results: /usr/bin/spamd: perl script text executable Additional info: [root]# egrep -n "(awk script text|perl script text)" /usr/share/file/magic 2915:0 string/b #!\ /bin/nawk new awk script text executable 2916:0 string/b #!\ /usr/bin/nawk new awk script text executable 2917:0 string/b #!\ /usr/local/bin/nawk new awk script text executable 2918:0 string/b #!\ /bin/gawk GNU awk script text executable 2919:0 string/b #!\ /usr/bin/gawk GNU awk script text executable 2920:0 string/b #!\ /usr/local/bin/gawk GNU awk script text executable 2922:0 string/b #!\ /bin/awk awk script text executable 2923:0 string/b #!\ /usr/bin/awk awk script text executable 2925:0 regex BEGIN[[:space:]]*[{] awk script text 9794:0 string/b #!\ /bin/perl perl script text executable 9795:0 string eval\ "exec\ /bin/perl perl script text 9796:0 string/b #!\ /usr/bin/perl perl script text executable 9797:0 string eval\ "exec\ /usr/bin/perl perl script text 9798:0 string/b #!\ /usr/local/bin/perl perl script text 9799:0 string eval\ "exec\ /usr/local/bin/perl perl script text executable 9800:0 string eval\ '(exit\ $?0)'\ &&\ eval\ 'exec perl script text
It is same problem as in #202185. I will reopen it and fix the bug there. See it for details. *** This bug has been marked as a duplicate of 202185 ***