#! /bin/sh

#
# A simple xfind command using xfm 
# (c) Simon Marlow 1992
#
# There's some pretty horrible kludging of pathnames here - we need to strip off
# the trailing filenames, but in order to get the pathnames through sed, all
# the '/'s must be converted to '\/'s.

CWD=`pwd | sed -e 's/\//\\\\\//g'`
find $* -print | sed -e "s/\/[^/]*$//" | sed -e "s/^\./$CWD/" | sort | uniq | xargs xfmc -o
