From: Garance A Drosehn Date: 2007-03-13T07:00:11+09:00 Subject: Re: proper usr/bin/env ruby shebang ------=_Part_11010_10807910.1173736807016 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2/1/07, Garance A Drosehn wrote: > > > I also have to write ruby or perl scripts which have to work on a variety > of > unix-based operating systems. What I have come up with is the following. > I'm sure that it will not work on some operating system, but it works on > the > dozen operating systems that I have to care about, in all situations that > I > have cared about. Some people have mentioned that my sample-code was reformatted into something close to useless by their email (or web-ized mail) clients. So here is a very simple "Hello World" script which includes my ruby-finding strategy, along with some comments about how it works: http://people.freebsd.org/~gad/tools/safe_ruby_script (that is the actual script, and not a web page which displays the script, so your web browser might simply download it as a file to your desktop) I realize that it isn't a truly 100% perfect solution for every possible situation, but it has worked well over the past few years for me, writing scripts which had to work reliably on several different platforms. -- Garance Alistair Drosehn = drosihn@gmail.com Senior Systems Programmer Rensselaer Polytechnic Institute; Troy, NY; USA ------=_Part_11010_10807910.1173736807016--