From df4680e756be9a6aa046f1c49bedcbda2a9122f5 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Sep 2013 10:31:14 -0700 Subject: [PATCH] monfold.sh: Use $(...) instead of `...` for command substitution It's nestable [1], and it just looks nicer. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03 --- posts/inotify/monfold.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posts/inotify/monfold.sh b/posts/inotify/monfold.sh index 14ba57e..7c92706 100755 --- a/posts/inotify/monfold.sh +++ b/posts/inotify/monfold.sh @@ -57,9 +57,9 @@ EOF LASTFILE="" # Multiple close events for the same file as data is written in blocks while read LINE; do - DIR=`echo "$LINE" | awk '{print $1}'` # has trailing slash - EVENT=`echo "$LINE" | awk '{print $2}'` - FILE=`echo "$LINE" | awk '{print $3}'` + DIR=$(echo "$LINE" | awk '{print $1}') # has trailing slash + EVENT=$(echo "$LINE" | awk '{print $2}') + FILE=$(echo "$LINE" | awk '{print $3}') if [ "$EVENT" != "CLOSE_WRITE,CLOSE" ]; then echo "Error (unexpected event '$EVENT'):" echo "$LINE" -- 2.26.2