commit 63356b3f66974610b64560ec8c74ad1d00812fc5 parent d10bcf384f1acdc08898879a30f8b3c4c184492f Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 4 May 2020 20:01:25 +0200 Add wrapper script for md2point and catpoint Diffstat:
A | .local/bin/md2cat | | | 19 | +++++++++++++++++++ |
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/.local/bin/md2cat b/.local/bin/md2cat @@ -0,0 +1,19 @@ +#!/bin/sh + +usage() { + printf 'usage: %s FILE ...\n' "${0##*/}" >&2 + exit 1 +} + +[ $# -lt 1 ] && usage + +o="$PWD" +for f in "$@"; do + d="$(mktemp -d)" + cd "$d" + md2point < "${o}/${f}" + catpoint *.txt + rm -f "${d}/"*.txt + rmdir "$d" + cd "$o" +done