#!/bin/bash # Share a text file to shrlok. cat <(printf '{"type":"txt"}\0') "$1" \ | socat - UNIX-CONNECT:/run/shrlok/shr.sock \ | sed 's|/var/www/files|https://files.dece.space|' \ ; echo