#!/bin/sh . ./bigxml xmldoc 'foo' '' \ | ./xmlstarlet val --embed --err - 2>&1 >/dev/null \ | ${SED:-sed} -n "$SEDLINUM_PROG" \ | head -n 1 # a bug in libxml 2.9.0 causes extra errors to be # printed, so we take just the first