#!/bin/sh usage() { printf 'usage: %s tag file\n' $0 exit 1 } test $# -lt 2 && usage tag="$1"; shift sed "/a89e088=/ { n; c\\ $tag }" "$@"