Command-line interface to BBEdit’s Find Differences command on Mac OS X.

Source Code

bbdiff 1.1 (3 KB) Updated 5 Dec 2002


bbdiff [-b -i -s] oldfile newfile


Keep BBEdit in the background. By default, BBEdit will activate if differences are found.
Case insensitive comparison.
Ignore leading and trailing whitespace on lines.


bbdiff is simply a Perl script which communicates with BBEdit via AppleScript. To install it, download the source file, or copy and paste it into a new text document (with Unix-style line endings). Move it to a location in your PATH, such as /usr/local/bin/. Set the permissions on the bbdiff file such that the executable bits are turned on. For example:

chmod 755 bbdiff

Version History

1.0: Sat Nov 30, 2002
Initial release.

1.1 Wed Dec 4, 2002

  • Swapped order of oldfile and newfile in argument list, to match the usage of existing diff tools.
  • bbdiff now converts arguments to full paths before testing whether the files exist.

Copyright and License

Copyright (c) 2002 John Gruber

This program is free and open software. You may use, copy, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.

Copyright © 2004 John Gruber.
Daring Fireball is powered by Movable Type.