This commit is contained in:
marguesto 2022-06-27 01:18:43 +02:00
commit 50b26c270f
1 changed files with 22 additions and 0 deletions

22
up Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# up: to upload files on 0x0.st.
upload()
{
if echo "$1" | grep -q 'http\(s\?\)://'; then
curl -F "url=$1" https://0x0.st
echo "bye boss"
else
curl -F "file=@$1" https://0x0.st
echo "bye boss"
fi
}
if [[ $# == 0 ]]; then
read -p "url/file: " targ
upload $targ
else
for file in $@; do
upload "$file"
done
fi