#!/bin/bash output=`/usr/local/sbin/filetraq /etc/filetraq.conf /var/lib/filetraq 2>&1` # check if the first line is about adjtime tmp=`echo "$output" | head -1 | grep adjtime` if [[ -n $tmp ]]; then # print whatever ouput remains apart from adjtime diff echo "$output" | sed 1,8d else # show diffs altogether echo "$output" fi unset tmp