From: Greg Donald Date: 2008-06-28T05:46:33+09:00 Subject: Re: changing the shebang of ruby files best way ? On Fri, Jun 27, 2008 at 3:22 PM, Une Bévue wrote: > I've a lot of ruby files (grabed from net) having a wrong shebang for my > setup. > > actual shebang is : > #!/usr/bin/ruby -w > > and i need to change it to : > #! /usr/bin/env ruby -w for file in *.rb; do cp $file $file.tmp sed -e "s/#!\/usr\/bin\/ruby\ -w$/#!\/usr\/bin\/env\ ruby\ -w/g" $file.tmp >$file rm $file.tmp done -- Greg Donald http://destiney.com/