Source

pcw / extras / cw_color.awk.sh

#!/bin/bash
NICK="emg"

while [ $# -gt 0 ]; do
	case $1 in
		-i) IN="$2"
			;;
		-o) OUT="$2"
			;;
		-n) NICK="${2:-$NICK}"
			;;
		*)  echo "bad argument $1"
			exit 2
			;;
	esac
	shift 2
done

export NICK

cw "${IN:?no -i infile specified}" "${OUT:?no -o outfile specified}" | cw_color.awk