monfold.sh: Use $(...) instead of `...` for command substitution
[blog.git] / posts / inotify / monfold.sh
index 14ba57ec4e62f3e81d5a1a5656d2a4483651ac53..7c92706aebb6e649b01e3b21c7e9ec0584741bb0 100755 (executable)
@@ -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"