Bug 203610 - file reports "awk script text" even if script starts with #!/usr/bin/perl
file reports "awk script text" even if script starts with #!/usr/bin/perl
Status: CLOSED DUPLICATE of bug 202185
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
5
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Martin Bacovsky
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-22 14:22 EDT by Dieter Stumpner
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-23 04:51:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dieter Stumpner 2006-08-22 14:22:52 EDT
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
Comment 1 Martin Bacovsky 2006-08-23 04:51:05 EDT
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 ***

Note You need to log in before you can comment on or make changes to this bug.