From: mike@... (Mike Stok) Date: 2003-09-24T20:18:42+09:00 Subject: Re: Article on oreilly.net on how to build Unix tools with Ruby In article <20030923200517.A36392@freeze.org>, Jim Freeze wrote: >On Wednesday, 24 September 2003 at 8:24:36 +0900, Michael W Thelen wrote: >> * Gavin Sinclair [2003-09-23 17:16]: >> > On Wednesday, September 24, 2003, 2:33:01 AM, Paul wrote: >> > > 3. I wish he'd mentioned the option of using #!/usr/bin/env ruby >> > > instead of #!/usr/local/bin/ruby. >> > >> > Can someone please explain to me what /usr/bin/env/ruby does? > >Speaking of env, does this work on linux when options are passed >to ruby? > >I'm not at a linux terminal right now, but when the shebang is: > > /usr/bin/env ruby -w > > I get the error that ruby -w is not found. > The gnu manual says that it should work, but it certainly > doesn't work as it does on FreeBSD or Sun. One way of getting arounf env's ignoring ARGS iff you are just doing -w is to put $VERBOSE = true after the shebang line. See http://mail.gnu.org/archive/html/bug-sh-utils/2002-04/msg00020.html for an explanation. Hope this helps, Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA