Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shebang problem
- X-seq: zsh-workers 23012
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: shebang problem
- Date: Sat, 25 Nov 2006 11:31:16 -0800
- In-reply-to: <48AA2667-A59C-4B22-AC23-4CCF62857FE6@xxxxxxx>Comments: In reply to Une Bévue <yt.dev@xxxxxxx> "shebang problem" (Nov 25, 3:06pm)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <48AA2667-A59C-4B22-AC23-4CCF62857FE6@xxxxxxx>
On Nov 25, 3:06pm, Une Bévue wrote:
}
} #!/usr/bin/env ruby
}
} $ ./my_script.rb <the args>
}
} zsh complains of syntax error because it attempt to read to ruby
} file, which, obviously, doesn't have the same syntax as the shell.
I think you must be misinterpreting something about what's happening.
E.g., I made a little script that feeds itself to "cat":
schaefer[509] ./dog -n
1 #!/usr/bin/env cat
2 Woof woof
That seems to be working properly.
What output do you get from this:
file -L ${^path}/ruby(N)
My suspicion is that perhaps there's another file named "ruby" somewhere
in your path that is not the executable you think it is.
} someone running over a linux box (i don't know it's shell) said it's
} a known prob at least sicnce jul 2003.
Not that I've ever heard of before. A known problem with ruby, perhaps?
} that's the reason for this shebang that way i was believing the shell
} would address the right ruby...
The shell isn't "addressing" ruby at all when you have that #! line ...
rather, /usr/bin/env is (or should be) invoked, and then env locates
ruby and executes it.
This may appear to be a silly question, but: Are you certain that the
"#" character is the very first character in the file?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author