Print histogram in ascii file in ROOT 6

They way to do it was the following

root [0] .> file.dat
histogram->Print("all")
.>