Hello,
Does anybody knows if there is a way to activate the ‘in place edit
mode’ from within a Ruby script that would have the same effect as using
the -i option on the command line?
Thanks
Laurent
Hello,
Does anybody knows if there is a way to activate the ‘in place edit
mode’ from within a Ruby script that would have the same effect as using
the -i option on the command line?
Thanks
Laurent
Laurent J. wrote:
Hello,
Does anybody knows if there is a way to activate the ‘in place edit
mode’ from within a Ruby script that would have the same effect as using
the -i option on the command line?
Use $-i="" :
[~/tmp] cat >foo
foo
[~/tmp] cat dash-i.rb
$-i=""
[~/tmp] ruby -r dash-i -p -e ‘$_.upcase!’ foo
[~/tmp] cat foo
FOO
HTH
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs