From: Alain Helfenstein Date: 2009-01-12T04:25:11+09:00 Subject: Re: Ruby Command Line One Liner unknown wrote: > On Jan 1, 1:51�pm, Alain Helfenstein wrote: >> ruby -i.bak -p -e 'puts ARGF.read.gsub(/.*(?=package)/m,"/**\n * foo.bar >> 2001-2009\n\ **/\n")' test/Test.java >> >> Does anybody have a idea on how to solve this problem for all *.java >> files in the test directory? >> >> Thanks for your answer, >> Alain. >> -- >> Posted viahttp://www.ruby-forum.com/. > > ruby -i.bak -0777 -pe"sub /.*foo/m,'bar'" *.java Thanks a lot for the help. The -0777 flag was the key to success, Alain. -- Posted via http://www.ruby-forum.com/.