#!/bin/sh
#
#	Filter UNIX listings to get rid of selected bogosities.
#
#				- Bill Heelan (wheelan@cs.mcgill.ca)
#
sed '
# trash the line with the error and the one following it.

/: Permission denied$/{
N
d
}

# trash the line with the error

/[ 	]not found$/d
/: Could not open/d
/^can not access directory/d
/^Total: [0-9][0-9]* kbytes$/d

# separate any permissions and links fields that have been
# squashed together

/^\([-bcdlps][-r][-w][-xsS][-r][-w][-xsS][-r][-w][-xtT]\)\([0-9][0-9]*\)[ 	]/s//\1 \2 /
'
