Skip to content

Instantly share code, notes, and snippets.

@diniremix
Forked from persand/gist:1355589
Created November 16, 2011 15:44
Show Gist options
  • Save diniremix/1370410 to your computer and use it in GitHub Desktop.
Save diniremix/1370410 to your computer and use it in GitHub Desktop.
Bash script for github.com/x URL:s -> git.io
function shit() {
if [ -n "$2" ]; then
curl -i http://git.io -F url=https://github.com/"$1" -F code="$2";
else
curl -i http://git.io -F url=https://github.com/"$1";
fi
}
@diniremix
Copy link
Author

I made ​​some modifications to original Shit because when function calls, not sending the parameters and the option if [ -n "$ 2" ] is not validated and jumped default option 1.
Parameters are now stored in variables and used within the main function.

the modified program is here https://github.com/diniremix/shit2
thank you very much for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment