import scala.sys.process._
"date"!
"date" #>> new java.io.File("dates.tmp") !
"cat dates.tmp" !
val files="ls"!!
val filteredFiles="ls" #| "grep .tar.gz" !!
val filesArray=("ls"!!).trim.split("\\n")
Using this language and its advanced features make system scripting quite easy and safer. No more problem with space in file names or directories, and so on ... sh coding is really a nightmare.
CONTEXT : Linux Gentoo / Scala 2.9.0 / Java 1.6.0_26
0 commentaires:
Post a Comment