#!/bin/sh # Checking to see if the output of the test scripts is the same as that for the # reference log files is obscured by the differences in dates and file paths. # # This script filters out date strings and file paths from the input stream # and replaces them with a canonical string. # Example # % tFiltAudio | filter_log > new.log # % diff new.log tFiltAudio.log # Editing: # - Remove the file paths up to a "/test/" component # - Remove dates of the form "1996/03/18 12:34:60". These dates appear as # part of the header information for audio files. The dates altered must # be surrounded by blank characters. Dates in the 1970's and 1980's are not # modified (such dates should never appear in the temporary audio files). # - Remove dates of the form "1996/03/18". These dates appear as time stamps # in some programs. It is assumed that these dates are surrounded by # blanks. # - Dates from version/date strings are not modified, since the date appears # at the end of a line. sed 's| /.*/test/| --path--/test/|; s| [12][90][^78][0-9]/../.. ..:..:.. | YYYY/MM/dd hh:mm:ss |; s| [12][90][^78][0-9]/../.. | YYYY/MM/dd |' # $Id: filter_log,v 1.3 1996/03/16 AFsp-V2R1 $