From: Gavin Sinclair Date: 2005-12-02T16:12:31+09:00 Subject: Re: rio-editing on-the-fly Wybo Dekker wrote: > according to the rio-docs I would expect it to be possible to edit a file > on-the-fly; for example, I tried to make a copy of /etc/passwd with my own > name (wybo) replaced with XXXX: > > rio('/etc/passwd').gsub(/wybo/,'XXXX') > rio('new') > > but the resulting file "new" is an exact copy of /etc/passwd. > What am I doing wrong? You're not reading the file. Try rio('/etc/passwd').read.gsub(/wybo/,'XXXX') > rio('new') Perhaps there's a better suggestion? Gavin