#!/bin/bash -e if [ $# -eq 0 ]; then echo 'Error: no arguments supplied' >&2 exit 1 fi # sed removes all of the coloring, and (hopefully) all the other escape # sequences that col doesn't deal with well. script -qfe >(sed 's:\x1B\[[0-9;?]*[mKJl]::g; 1d; $d' | col -bx | curl -F sunset=604800 -F c=@- "https://ptpb.pw/") -c "$*"