A
Alain Helfenstein
Hi,
I try to write a Ruby one-liner that replaces the header information of
some *.java files.
My first try worked perfect for a single file. But I have no idea on how
to change my one-liner to work with multiple files.
Here is my one-liner for a single file:
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.
I try to write a Ruby one-liner that replaces the header information of
some *.java files.
My first try worked perfect for a single file. But I have no idea on how
to change my one-liner to work with multiple files.
Here is my one-liner for a single file:
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.