Bug 119242 - bash will not run valid #! script
bash will not run valid #! script
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2004-03-26 20:02 EST by Perry Hutchison
Modified: 2007-04-18 13:04 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-27 19:25:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
annotated typescript showing failure (833 bytes, text/plain)
2004-03-26 20:23 EST, Perry Hutchison
no flags Details

  None (edit)
Description Perry Hutchison 2004-03-26 20:02:09 EST
Description of problem:

I have a #! script, which is marked executable, but bash will not
run it:  it says "bad interpreter: No such file or directory".
I have no idea what file or directory might be missing, however
the interpreter specified in the script does exist, has execute
permission, and can be run standalone.

Version-Release number of selected component (if applicable):

GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu)
Copyright 2000 Free Software Foundation, Inc.
from rpm bash-2.05-8

How reproducible:

Try to run a script whose first line is

Steps to Reproduce:
1.  install tcl-8.3.3-65 (if not already present on test system)
2.  create a #! script specifying /usr/bin/tclsh as its interpreter
3.  try to run it
Actual results:

bash: ./ttest: bad interpreter: No such file or directory

Expected results:

script should run

Additional info:
Comment 1 Perry Hutchison 2004-03-26 20:23:11 EST
Created attachment 98896 [details]
annotated typescript showing failure

file generated by "script" command, showing problem.
Lines starting ## are notes edited in later, not part of the original session.
Comment 2 Tim Waugh 2004-03-27 19:25:45 EST
Works for me with Fedora Core 1.
Comment 3 Perry Hutchison 2004-03-29 14:17:54 EST
Turns out the problem was a \r at the end of the #! line, so the
system was trying to run "/usr/bin/tclsh\r" which does not exist.

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