Paste number 318813: | vdiff |
Pasted by: | phf |
When: | 8 years, 9 months ago |
Share: | Tweet this! | http://paste.lisp.org/+6TZX |
Channel: | None |
Paste contents: |
#!/bin/sh (if (test -t 0); then diff -uNr $1 $2 else cat fi) | awk 'm = /^(---|\+\+\+)/ { if($2 != "/dev/null") { cmd = "shasum -a 512 \"" $2 "\" 2>/dev/null "; s = cmd | getline x; close(cmd); if (s) { split(x, a, " "); o = a[1]; } else { o = "false"; } print $1 " " $2 " " o; } else { print $1 " " $2 " false"; } } !m { print $0; }'
This paste has no annotations.