#!/bin/sh [ -n "$1" ] || exit sed -i "\|^${1}$|d" "${2}" echo "$1" >> "$2"