a txt file (1.txt) and column delimiter is a space for each row
content as following(in fact,there are many lines...):
1 2 3 4
a b c d
1 1 1 1
1 1 2 2
expected:
1 2 3 4
a b c d
now, i can get the correct output by as following code:
val lines = io.Source.fromFile("/root/1.txt").getLines
lines.filterNot(_.split("\\s+").distinct.length<4).foreach(println)
but, any more efficient methods to realize it ?
for example: multithreading or akka to realize it, thx.