xkcd/concat_htmls.sh
2023-11-27 17:14:28 +00:00

8 lines
202 B
Bash
Executable File

#!/usr/bin/env bash
set -euET -o pipefail
sed -ne '1,/^ *<\/ul>/p' "$1" | sed -e '/^ *<\/ul>/d'
sed -ne '/^ *<ul>/,/^ *<\/ul>/p' "$2" | sed -e '/^ *<ul>/d; /^ *<\/ul>/d'
sed -ne '/^ *<\/ul>/,$p' "$1"