+
+teeu() {
+ local help="Usage: teeu [-h|--help] FILE [LINE]
+Append LINE if it's not already in FILE
+
+If no LINE is specified, process each line from STDIN.
+teeu is short for tee unique.
+
+-h|--help display this message"
+
+ if [[ $1 == --help || $1 == -h ]]; then
+ echo "$help"
+ return
+ fi
+
+ if (( ${#@} == 0 )) ; then
+ echo "teeu error: need 1 or more arguments"
+ echo "$help"
+ return 1
+ fi
+ file="$1"
+ shift
+ local MAPFILE
+ if [[ $1 ]]; then
+ MAPFILE=("$*")
+ else