It's nestable [1], and it just looks nicer.
[1]: http://pubs.opengroup.org/onlinepubs/
9699919799/utilities/V3_chap02.html#tag_18_06_03
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"