I need a script in any language to capitalize the first letter of every word in a file.
Thanks for all the answers.
Stackoverflow rocks!
Scala:
scala> "hello world" split(" ") map(_.capitalize) mkString(" ") res0: String = Hello World
or well, given that the input should be a file:
import scala.io.Source Source.fromFile("filename").getLines.map(_ split(" ") map(_.capitalize) mkString(" "))