Skip to content

Instantly share code, notes, and snippets.

@akunzai
Last active August 29, 2015 14:05
Show Gist options
  • Save akunzai/8f51c6f6021af85752e8 to your computer and use it in GitHub Desktop.
Save akunzai/8f51c6f6021af85752e8 to your computer and use it in GitHub Desktop.
A simple Groovy class to provide functionality similar to Wget
#!/usr/bin/env groovy
if (!this.args.length){
scriptName = getClass().protectionDomain.codeSource.location.path.split('/')[-1]
throw new RuntimeException( "Usage: groovy ${scriptName} [urlToGet]" )
}
println new URL(this.args[0]).text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment