From: Ryan Davis Date: 2008-07-21T15:54:54+09:00 Subject: Re: changing the shebang of ruby files best way ? On Jul 20, 2008, at 13:10 , Garance A Drosehn wrote: > On Mon, Jun 30, 2008 at 3:14 PM, Ryan Davis ruby@zenspider.com> wrote: >> >> On Jun 29, 2008, at 20:59 , Garance A Drosehn wrote: >> >>> The 'env' command in FreeBSD provides a way around this, by adding >>> some more >>> options to 'env' so it can parse out the individual options, but I >>> don't >>> know if any other OS's will notice that and pick up the options. >>> (note: >>> I'm the guy who added those options to 'env' in FreeBSD...) >> >> I've been told that FreeBSD is going to start acting like linux in >> this regard... is that true? > > I'm not sure what you mean. The last I checked, freebsd parses the > '#!' line in the0 same way that Linux, Solaris, and a few other > unixes did. FreeBSD *used* to have a different way for parsing that > line, but a few years ago I fixed it to parse the line the same way > every other unix parses it. What I meant was, currently all the versions of freebsd that I use as well as OSX do a good job of parsing the shebang line so that options and/or trailing arguments are not considered part of the executable name. That is decidedly NOT the case on linux and a constant PITA as far as I'm concerned. not all ruby command line options have any other equivalent way of activating their functionality. For example, while -I has $:/ $LOAD_PATH, -s has no analogous enabler. This means either I can't use the functionality or I can't use /usr/bin/env because it'll break on linux. :/