Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Not quite.. It's the C system library that's generating the error message in this case. All your shell is doing is calling an exec() variant with the command you're trying to execute. The C library opens the script, sees that there's a shebang line at the top with an interpreter specified, and it tries to invoke the interpreter. Since the interpreter isn't found (because it has a trailing, spurious CR at the end of it in this case), the exec() call has to return with a "No such file or directory" error, which is what you see. It "might" be feasible for the shell to explore a little further into the cause of the error by testing to see if the file does indeed exist, and if it does, throw a more descriptive error message, but it doesn't. All bash knows is that the system told it ENOENT (No such file or directory) when the shell asked the system to execute your script.
execve("./test", 0x00053AA8, 0x00053AB0) Err#2 ENOENT

In reply to Re: Re: Odd -w behavior on scripts written on Win32 platform by Fastolfe
in thread Odd -w behavior on scripts written on Win32 platform by c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-18 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found