#!/bin/bash # Sync alpine address book if [ -f "$1"]; then if [ -f "$2"]; then cat "$1" >> "$2" else echo "Usage new address book old address book" exit 0 fi else echo "Usage new address book old address book" exit 0 fi # Strip duplicate lines uniq "$2" > complete_book # move complete_book to $2's name since that is where we expect to see our new addressbook... mv complete_book "$1"