Last active
August 29, 2015 14:05
-
-
Save akunzai/8f51c6f6021af85752e8 to your computer and use it in GitHub Desktop.
A simple Groovy class to provide functionality similar to Wget
This file contains 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
#!/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