Skip to content

Instantly share code, notes, and snippets.

@mhoffman
Created July 11, 2018 02:45
Show Gist options
  • Save mhoffman/aaabcc7bf27b002508e004bdd92ab7f4 to your computer and use it in GitHub Desktop.
Save mhoffman/aaabcc7bf27b002508e004bdd92ab7f4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env scala -savecompiled
import scala.io
val filename = new Exception().getStackTrace.head.getFileName
val file = scala.io.Source.fromFile(filename)
for (line <- file.getLines) {
println(line)
}
file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment