Redirecting root output

Dear experts,
after I read: Redirecting output, root 6
I did [1] but I still couldn’t get and output file. Do you see what is wrong?
I have root 6.06/01.
Regards

[1]
root [0]
Attaching file file.root as _file0…
(TFile ) 0x4014f90
root [1] TTree
t;
root [2] _file0->GetObject(“tree”, t)
root [3] t->Scan()

  •   24 *         1 *         2 *       369 *        15 * 22.771509 * 10.865847 * 1.0495445 * 0.8819180 *
    

Type to continue or q to quit ==> q


root [4] .>a.log
root [5] t->Scan()
Type to continue or q to quit ==> q
root [6] .>

Dear,
I found this post: Redirecting scan output to a text file?
[1] works, but [2] not. Is [2] possible or did I missed something?
Regards

[2]
root [4] t->Scan(“pt_1”) ; >scan.log
ROOT_prompt_4:1:19: error: expected expression
t->Scan(“pt_1”) ; >scan.log
^
ROOT_prompt_4:1:20: error: use of undeclared identifier 'scan’
t->Scan(“pt_1”) ; >scan.log

[1]
root [10] ((TTreePlayer*)(t->GetPlayer()))->SetScanRedirect(true);
root [11] ((TTreePlayer*)(t->GetPlayer()))->SetScanFileName(“output.txt”);
root [12] t->Scan(“pt_1”)
File <output.txt> created
(Long64_t) 26002

root [4] t->Scan("pt_1") ; >scan.logThis syntax no longer work in ROOT v6 (the ‘grammar’ was not regular enough)
Instead you can do: root [] .> scan.log root [] t->Scan("pt_1"); root [] .>

Cheers,
Philippe.

Dear Philip,
I tried this but it did not worked.
Regards

How did it fail?

Philippe.