I am trying to search all my machines for the presence of a local Google Drive folder. Borrowing from a script I have found in another thread I have set up an extension attribute with a script, but it is not recognizing the folder. Assuming the issue lies with the variable in the path to folder, but unsure how to rectify. (I am open to other options if extension attribute is not the way to go. New to the Casper Suite and still learning my way through) Thanks!
!/bin/bash
if [ -d "/Users/${loggedInUser}/Google Drive" ]; then
echo "<result>Has Work Folder</result>"
else
echo "<result>Does Not Have Work Folder</result>"
fi
exit