Paste number 306741: vdiff

Paste number 306741: vdiff
Pasted by: phf
When:9 years, 1 month ago
Share:Tweet this! | http://paste.lisp.org/+6KOL
Channel:None
Paste contents:
Raw Source | XML | Display As
#!/bin/sh
diff -uNr $1 $2 | awk 'm = /^(---|\+\+\+)/ {
    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;
}
!m {
    print $0;
}'

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.