My build of nnn with minor changes
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

12345678910111213141516171819
  1. #!/usr/bin/env sh
  2. # Description: Upload a file to file.io
  3. # Requires: curl, jq, tr
  4. # Note: File set to expire after a week
  5. #
  6. # Shell: POSIX compliant
  7. # Author: Arun Prakash Jana
  8. if [ -s "$1" ]; then
  9. # Upload the file, show the download link and wait till user presses any key
  10. curl -s -F "file=@$1" https://file.io/?expires=1w | jq '.link' | tr -d '"'
  11. # To write download link to "$1".loc and exit
  12. # curl -s -F "file=@$1" https://file.io/?expires=1w -o `basename "$1"`.loc
  13. else
  14. echo "empty file!"
  15. fi
  16. read -r _