jehanne/sys/src/lib/mp/port/reduce

17 lines
306 B
Plaintext

O=$1
shift
OBJTYPE=$1
shift
ls -p ../$OBJTYPE/*.[cs] >[2]/dev/null | sed 's/..$//' > /tmp/reduce.$PID
#
# if empty directory, just return the input files
#
if (! ~ $STATUS '|') {
echo $*
rm /tmp/reduce.$PID
exit 0
}
echo $* | tr ' ' \012 | grep -v -f /tmp/reduce.$PID | tr \012 ' '
rm /tmp/reduce.$PID