0x0
0x0 copied to clipboard
syntax errors on running the script
/usr/local/bin/0x0: line 2: syntax error near unexpected token `newline'
/usr/local/bin/0x0: line 2: `<?xml version="1.0" encoding="utf-8"?>'
Did you save the raw file instead of the HTML page that displays the script?
I followed your manual installation instructions. The 0x0 script is accessible systemwide in the terminal, but it spits out the error messages.
I can't reproduce this on Fedora 34 and curl 7.76:
❯ curl -LO https://raw.githubusercontent.com/Calinou/0x0/master/bin/0x0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2720 100 2720 0 0 8888 0 --:--:-- --:--:-- --:--:-- 8888
~
❯ ./0x0
zsh: permission denied: ./0x0
~
❯ chmod +x 0x0
~
❯ ./0x0
0x0, a wrapper script for https://0x0.st/
Upload a file:
0x0 <file>
Upload from an URL (the file won't be fetched locally):
0x0 <url>
Upload from standard input:
0x0 -
The uploaded file's URL is printed to standard output when the upload is completed.
Which operating system and curl version are you using? (curl --version)
PS: If you can't get this script to work, remember that this shell script is just a tiny wrapper. If you have curl installed, you can run:
curl -F'[email protected]' https://0x0.st
Or to upload a file from a remote URL (making 0x0.st download that file to upload it):
curl -F'url=http://example.com/image.jpg' https://0x0.st
You could create your own shell alias to require less typing.
@esinkei Are you still getting errors when running this?
Nah! Everything is fine now.