diff --git a/README.md b/README.md index d93bf56..94bc046 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you'd like an alternative on Windows that supports functionality similar to ` Han Boetes and @nickthename have contributed a simple shell-script alternative for those not interested in installing a RubyGem: ``` bash -haste() { a=$(cat); curl -X POST -s -d "$a" https://hastebin.com/documents | awk -F '"' '{print "https://hastebin.com/"$4}'; } +haste() { curl -X POST -s -d "$(cat $1)" https://hastebin.com/documents | awk -F '"' '{print "https://hastebin.com/"$4}'; } ``` Usage: @@ -78,6 +78,11 @@ Usage: ``` bash cat file.txt | haste ``` +or: + +```bash +haste file.txt +``` And a more expansive BASH option by @diethnis can be found at: https://github.com/diethnis/standalones/blob/master/hastebin.sh