OS X Bash, 'watch' command

joseph.hainline picture joseph.hainline · Mar 5, 2012 · Viewed 137.7k times · Source

I'm looking for the best way to duplicate the Linux 'watch' command on Mac OS X. I'd like to run a command every few seconds to pattern match on the contents of an output file using 'tail' and 'sed'.

What's my best option on a Mac, and can it be done without downloading software?

Answer

seantomburke picture seantomburke · Apr 29, 2014

With Homebrew installed:

brew install watch