#!/bin/csh -f # pbdiff # ----------------------------------------------------------------------------- # C shell script to prompt the user twice to copy text into the Mac # paste buffer, dump those blocks of text into 2 temp files, and # compare them. # ------------------------------------------------------------------------------ set timestamp = `date "+%Y_%m_%d__%H_%M_%S"` set tempfile1 = "/tmp/$0:t_$$_file1_$timestamp" set tempfile2 = "/tmp/$0:t_$$_file2_$timestamp" pause Select and copy a 1st block of text to be compared, then hit Enter pbpaste >! $tempfile1:q pause Select and copy a 2nd block of text to be compared, then hit Enter pbpaste >! $tempfile2:q windiff $tempfile1:q $tempfile2:q rm $tempfile1:q rm $tempfile2:q