From: Alain Helfenstein Date: 2009-01-02T04:51:19+09:00 Subject: Ruby Command Line One Liner 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. -- Posted via http://www.ruby-forum.com/.