Paste number 318813: vdiff

Paste number 318813: vdiff
Pasted by: phf
When:3 years, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+6TZX
Channel:None
Paste contents:
Raw Source | XML | Display As
#!/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.

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.