#!/bin/sh
clean() {
    cat ~/.browser_history \
        | sort -k 3 \
        | uniq -f2 \
        | sort \
        > /tmp/browser_history \
    && mv /tmp/browser_history ~/.browser_history
    echo done.
}

case "$1" in
    clean) clean; ;;
    *) vim ~/.browser_history; ;;
esac
