On Mon, Jan 19, 2015 at 10:58:02PM +0100, Clément Bœsch wrote: > - echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | bc > + awk "BEGIN { v=$1-$2; printf \"%d\\n\", ((v<0?v:-v) > $3) ? 1 : 0 }"
I'd suggest single quotes for the outer ones, then you do not need to escape \ and ". Also it's broken, you inverted the absolute value condition. Lastly, at least with gawk the last ?: is pointless, conditions evaluate to 1/0 like in C. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel