33347f74a0bc9b912be46d2d8dcd7992c4c60552
2 # Copyright (C) 2014 Ian Kelling
3 # This program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>
6 local help="Usage: appendu [-h|--help] FILE
8 Tee unique. Append each stdin line if it does not exist in the file
10 [-h|--help] display this message"
13 if [[ $1 == --help ||
$1 == -h ]]; then
18 if [[ ${#@} == 0 ]]; then
19 echo "error: need 1 or more arguments"
26 for line
in "${MAPFILE[@]}"; do
27 grep -xFq "$line" "$1" &>/dev
/null ||
tee -a "$1" <<<"$line"