9 members
Description
by Zemian Deng
Aug 29, 2008
//file: cat.scala import java.io._ val files = args for(f <- files){ val reader = new BufferedReader(new FileReader(f)) var ln: String = null while({ln = reader.readLine; ln != null}) println(ln) }
Cancel
Other Languages on the JVM Village
9 members
Description
Scala Example: a simple cat command
by Zemian Deng
Aug 29, 2008
Here is a simple Scala script that prints or concatenates text files:
Happy programming!
-Z