11 lines
337 B
Bash
Executable file
11 lines
337 B
Bash
Executable file
#!/bin/bash - not strictly necessary, but helps nano with syntax highlighting.
|
|
|
|
imagebin() {
|
|
# Throw an image file into imagebin.
|
|
|
|
[[ -z "$1" ]] || [[ ! -e "$1" ]] && {
|
|
printf "%s: %s\\n" "Usage" "${FUNCNAME[0]} <filename>" >&2
|
|
return 1
|
|
}
|
|
curl -F file="@$1" https://imagebin.ca/upload.php | grep '^url:' | cut -d: -f2-
|
|
}
|