From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9v?= =?ISO-8859-1?Q?ue?=) Date: 2008-06-28T05:22:42+09:00 Subject: changing the shebang of ruby files best way ? 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 that way i'll get the ruby in my PATH and not a fixed ruby. what i plan to do : detect if the shebang isn't correct and if true : move the file to a temp directory create a new with "good" shebang having path/name of the previous remove the tmp dir but i wonder, because i know i have to change the first line only, if i could change the uncorrect file "in place" even if my shebang line is longer (4 chars) than the preceeding one ???? -- Une B�vue