#!/bin/awk -f BEGIN { if (ARGC != 3) { print "usage: snap.missing source destination" exit 2 } while ("snap.list " ARGV[1] "/" | getline) { snapshots[$0] = 1 } while ("snap.list " ARGV[2] "/" | getline) { snapshots[$0] = 0 } for (ts in snapshots) { if (snapshots[ts]) print ts } }