var lines = system ("ls") foreach line lines { println (line) }