diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 22:20:38 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 22:20:38 +0300 |
commit | 3c46482a9e6e2acaa6cb0d59aba3c61a3c12c13e (patch) | |
tree | 816553d30257e216886717f0ec3e1be0d769d277 | |
parent | 987453061524ab9a50cb74a1a40fd5c7073c2417 (diff) |
Readability and style improvements
-rw-r--r-- | include/functions | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/functions b/include/functions index 8ddb94c2..d3b01a55 100644 --- a/include/functions +++ b/include/functions @@ -716,24 +716,24 @@ LogText "Result: unclear if we can read this file, as this is a symlink" ReportException "FileIsReadable" "Can not determine symlink ${sFILE}" elif [ -d ${sFILE} ]; then - OTHERPERMS=`ls -d -l ${sFILE} | cut -c 8` + OTHERPERMS=$(ls -d -l ${sFILE} | cut -c 8) elif [ -f ${sFILE} ]; then - OTHERPERMS=`ls -d -l ${sFILE} | cut -c 8` + OTHERPERMS=$(ls -d -l ${sFILE} | cut -c 8) else OTHERPERMS="-" fi # Also check if we are the actual owner of the file (use -d to get directory itself, if its a directory) - FILEOWNER=`ls -dln ${sFILE} | awk -F" " '{ print $3 }'` + FILEOWNER=$(ls -dln ${sFILE} | awk -F" " '{ print $3 }') if [ "${FILEOWNER}" = "${MYID}" ]; then LogText "Result: file is owned by our current user ID (${MYID}), checking if it is readable" if [ -L ${sFILE} ]; then LogText "Result: unclear if we can read this file, as this is a symlink" ReportException "FileIsReadable" "Can not determine symlink ${sFILE}" elif [ -d ${sFILE} ]; then - OTHERPERMS=`ls -d -l ${sFILE} | cut -c 2` + OTHERPERMS=$(ls -d -l ${sFILE} | cut -c 2) elif [ -f ${sFILE} ]; then - OTHERPERMS=`ls -d -l ${sFILE} | cut -c 2` + OTHERPERMS=$(ls -d -l ${sFILE} | cut -c 2) fi else LogText "Result: file is not owned by current user ID (${MYID}), but UID ${FILEOWNER}" |