I put this together and all of it's pieces work fine when run in terminal. I just cannot get it to work when running it in JAMF. The $user seems to be the issue. When I add the user directory of the test Mac it works fine but without it I get a "No such file or directory" error. Can anyone see what I am doing wrong? The macOS is Monterey 12.1 if that helps
# Pull current logged in user into 'user' variable.
user=`ls -l /dev/console | cut -d " " -f 4`
# Delete User CCDA default preferences
rm -R '/Users/$user/Library/Application Support/Adobe/OOBE/com.adobe.acc.container.default.prefs'
Any help would be appreciated.