Created
August 7, 2015 10:57
-
-
Save fujii/edf595aa46f8f83261e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
opt=() | |
while test $# -gt 0 -a "${1:0:1}" = -; do | |
opt=("${opt[@]}" "$1") | |
shift | |
done | |
if test $# -lt 3; then | |
echo Usage: $0 [diff options] command [command options] file-a file-b | |
exit 1 | |
fi | |
cmd=${@:1:$(($#-2))} | |
shift $(($#-2)) | |
exec diff ${opt[@]} --label "$1" --label "$2" <(${cmd[@]} "$1") <(${cmd[@]} "$2") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment