#!/usr/bin/env rc fn read { $HOME/9/plan9port-master/bin/read } fn sum { find $1 -type f | while (f = `{read}) { if (test -f $"f) { shasum -a 256 $"f } } } dir='b' previous = '' #cat sum | while (line = `{read}) { sum $dir | sort | tee sum | while (line = `{read}) { sum = `{echo $line | sed -e 's/ .*//'} if (~ $sum $previous) { file = `{echo $line | sed -e 's/[^ ]*//'} echo $"file } previous = $sum }