Skip to content

Instantly share code, notes, and snippets.

@sen3ca
sen3ca / watch
Created February 27, 2013 20:52 — forked from exogen/watch
#!/bin/bash
#
# Author: Brian Beck <exogen@gmail.com>
# Usage: watch PATH COMMAND...
#
# This script watches PATH and runs COMMAND whenever PATH or a descendent
# of PATH is modified. COMMAND is everything after the first argument.
#
# If PATH is "-", then the list of paths comes from standard input.
#
@sen3ca
sen3ca / watch
Last active December 14, 2015 07:38 — forked from exogen/watch
updated to be compatible with Ubuntu 12.04. Originally only saw it working on a Mac... can't say if you'd run into problems with other *nix based OSes
#!/bin/bash
#
# Author: Brian Beck <exogen@gmail.com>
# Usage: watch PATH COMMAND...
#
# This script watches PATH and runs COMMAND whenever PATH or a descendent
# of PATH is modified. COMMAND is everything after the first argument.
#
# If PATH is "-", then the list of paths comes from standard input.
#