Skip to content

Instantly share code, notes, and snippets.

@nicokosi
Last active December 16, 2015 22:49
Show Gist options
  • Save nicokosi/5509987 to your computer and use it in GitHub Desktop.
Save nicokosi/5509987 to your computer and use it in GitHub Desktop.
Groovy script that generates a text file
out = new File("C:/tmp/output.txt")
out.write "-- Dummy file header\n"
for (index in 1..5) {
out.append "line${index}\n"
}
println "Generated file ${out}."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment