Rob Sanheim
1/31/2007 5:50:00 PM
On 1/31/07, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Thu, 1 Feb 2007, Rob Sanheim wrote:
>
> > On 1/31/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
> >> Hi,
> >>
> >> At Thu, 1 Feb 2007 01:45:15 +0900,
> >> Rob Sanheim wrote in [ruby-talk:237036]:
> >> > I'm trying to convert some bash scripts to use /usr/bin/env ruby
> >> > instead of hardcoded shebang lines, and running into an issue. Using
> >> > this:
> >> >
> >> > #!/usr/bin/env ruby -w
> >> >
> >> > results in this error:
> >> >
> >> > /usr/bin/env: ruby -w: No such file or directory
> >>
> >> Do not rely on /usr/bin/env, it may not exist.
> >>
> >> #!/bin/sh
> >> exec ruby -x "$0" "$@"
> >> #!ruby -w
> >>
> >
> > Ugh, so I need that at the top of all these scripts? I thought
> > /usr/bin/env was the 'better' way to go?
> >
>
> you can use
>
> #! /usr/bin/env ruby
> $VERBOSE=true
That will work - thanks.