diff --git a/Office_License.sh b/Office_License.sh index 8240d79..0b3a51d 100644 --- a/Office_License.sh +++ b/Office_License.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -<= 501 { print $1 }' ) - while IFS= read aUser + while IFS= read -r aUser do # get the user's home folder path homePath=$( eval /bin/echo ~$aUser ) @@ -116,7 +109,7 @@ function DetectO365License { O365SUBBAK2="$homePath/Library/Group Containers/UBF8T346G9.Office/O4kTOBJ0M5ITQxATLEJkQ40SNwQDNtQUOxATL1YUNxQUO2E0e" # hidden file # checks to see if an O365 subscription license file is present for each user - if [[ -f "$O365SUBMAIN" || -f "$O365SUBBAK1" || -f "$O365SUBBAK2" || -d "$O365SUBNEW" ]]; then + if [ -f "$O365SUBMAIN" ] || [ -f "$O365SUBBAK1" ] || [ -f "$O365SUBBAK2" ] || [ -d "$O365SUBNEW" ]; then activations=$((activations+1)) fi done <<< "$userList" @@ -144,4 +137,4 @@ elif [ "$PERPETUALPRESENT" == "No" ] && [ ! "$O365ACTIVATIONS" ]; then /bin/echo "No license" fi -exit 0 \ No newline at end of file +exit 0