From: David Balmain Date: 2006-06-03T11:50:41+09:00 Subject: Re: Rake questions Hi Eric, I'm by no means a rake expert but since no-one else has answered; On 6/3/06, Eric Armstrong wrote: > 1. Is there some reason to prefer > sh %{ls -ltr} > over > sh "ls -ltr" > ? Perhaps so that you can do this; sh %{grep "long long" *} without having to escape the double quotes. Just a guess. > 2. My standard csh idiom for creating a log > file is this: > ls |& tee test.log > > But when I try that in sh, the process > hangs, and nothing is written. truss > shows this: > waitid(P_PID, ...WEXITED|WTRAPPED|WNOWAIT) > (sleeping...) > > Is there a Rakefile idiom for displaying > execution results and also saving them > in a file? I'd do this; def tee(output, file_name) puts output File.open(file_name, "a") {|f| f << output } end task :default do tee `ls`, "out.log" end > 3. A single quote (') in a comment causes a parse > error. Is this a known rake bug? If not, > what's the best way to report it? I'm not sure exactly what you mean by this. Are you saying # this is a comment with a quote ' causes a parse error? Anyway, I'm not sure where to report bugs to Rake but I'd probably try the devel mailing list; http://rubyforge.org/mailman/listinfo/rake-devel They should at least point you in the right direction.