Skip to content

Instantly share code, notes, and snippets.

@wvl
Created January 10, 2011 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvl/772725 to your computer and use it in GitHub Desktop.
Save wvl/772725 to your computer and use it in GitHub Desktop.
map reduce with redo: apenwarr #2
redo-ifchange $1.data
echo $1.data >>needs-reduce
#!/bin/sh
echo $ARGV
for d in *.data; do
echo "${d%.data}.stamp"
done | xargs redo-ifchange
sh do-reduce $(sort needs-reduce | uniq) > $3
cat did-reduce needs-reduce | sort | uniq >did-reduce.new
mv did-reduce.new did-reduce
rm -f needs-reduce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment