Created
October 2, 2014 07:54
-
-
Save amasho/75accf701e01535b5517 to your computer and use it in GitHub Desktop.
tupleの壊れたデータを除外抽出する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.io.Source | |
| import java.io.FileWriter | |
| val file = "15_10.20.4." | |
| (1 until 9).foreach(i => { | |
| val fw = new FileWriter(file + s"${i.toString}-2.log"); | |
| Source.fromFile(file + s"${i.toString}.log").getLines().foreach(l => | |
| if(l.split("\t").size == 5){ fw.write(l + "\n") } | |
| ) | |
| fw.close() | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment