Skip to content

Instantly share code, notes, and snippets.

@bing0o
Created May 23, 2020 20:36
Show Gist options
  • Select an option

  • Save bing0o/5f4c422a1ba446a5195be4e0286dc620 to your computer and use it in GitHub Desktop.

Select an option

Save bing0o/5f4c422a1ba446a5195be4e0286dc620 to your computer and use it in GitHub Desktop.
#!/bin/bash
transfer() {
[ -z "$1" ] && { echo "Usage: ./transfer file.txt"; exit 1; }
[ -z "$2" ] && fl=${1##*/} || fl=$2
curl --upload-file $1 https://transfer.sh/$fl
}
transfer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment