My build of nnn with minor changes
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

26 Zeilen
780 B

  1. #!/usr/bin/env sh
  2. # Description: Paste contents of a text a file http://ix.io
  3. # Upload a binary file to file.io
  4. # Requires: curl, jq, tr
  5. # Note: Binary file set to expire after a week
  6. #
  7. # Shell: POSIX compliant
  8. # Author: Arun Prakash Jana
  9. if ! [ -z "$1" ] && [ -s "$1" ]; then
  10. if [ "$(mimetype --output-format %m "$1" | awk -F '/' '{print $1}')" = "text" ]; then
  11. curl -F "f:1=@$1" ix.io
  12. else
  13. # Upload the file, show the download link and wait till user presses any key
  14. curl -s -F "file=@$1" https://file.io/?expires=1w | jq '.link' | tr -d '"'
  15. # To write download link to "$1".loc and exit
  16. # curl -s -F "file=@$1" https://file.io/?expires=1w -o `basename "$1"`.loc
  17. fi
  18. else
  19. printf "empty file!"
  20. fi
  21. read -r _