1
0
mirror of https://github.com/dutchcoders/transfer.sh.git synced 2020-11-18 19:53:40 -08:00

Merge pull request #129 from qoomon/patch-1

refactor bash script without temp files
This commit is contained in:
Andrea Spacca 2018-06-25 06:23:53 +02:00 committed by GitHub
commit 032dffb3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,11 +23,7 @@ $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
## Add alias to .bashrc or .zshrc
```
transfer() {
# write to output to tmpfile because of progress bar
tmpfile=$( mktemp -t transferXXX )
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
cat $tmpfile;
rm -f $tmpfile;
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) | tee /dev/null;
}
alias transfer=transfer