# etlib echo()(printf '%s\n' "$*") attr(){ # attr [NAME|VALUE] ATTR_STRING case "$1" in (name) echo "${2%%=*}" ;; (value) echo "${2#*=}" ;; esac } html_el(){ # el TAG [ATTRS...] [TEXT...] [< INPUT] tag="$1"; attrs= ; text= shift for arg do case "$arg" in (*=*) attrs="$attrs ${arg%%=*}=${arg#*=}"; shift ;; (*) break ;; esac done printf '<%s%s>%s' "$tag" "$attrs" test -n "$1" && printf '%s' "$*" if read -r fl then echo "$fl"; cat else echo fi |sed '$s,$,,' } alias p='html_el p' alias a='html_el a' alias h1='html_el h1' alias blockquote='html_el blockquote' alias bq=blockquote