From 1f8c32acf5d3d877e6f8c4481a1d3ea761c698b5 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Fri, 22 Aug 2014 09:45:08 +0300 Subject: [PATCH] whenfilechanges with glob support --- qcd_function | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qcd_function b/qcd_function index f7f6035..e136338 100644 --- a/qcd_function +++ b/qcd_function @@ -137,8 +137,6 @@ Keeps a history of folders visited in ~/.bash_cdhistory } - - function whenfilechanges() { [ -z "$2" ] && { echo 'Usage: whenfilechanges "file" "some" "command" Follows the modification time of the "file" and runs the command @@ -172,6 +170,7 @@ function whenfilechanges() { echo "${fname[$i]} changed:" eval "$@" otime[$i]=$( stat -c %Z "${fname[$i]}" ) + echo "Waiting for file changes..." } done sleep 2