I am trying to create a script to run from a Casper Server, I have managed to get the script to capture the current logged in user and I would like to move the fonts out of their ~/Library/Fonts/ folder.
I just keep getting an error that the folder does not exist, I think it is because I am trying to go to the hidden library folder, originally I thought it was because it couldn't find the "FontsRemoved" folder so I changed that to a variable too and I am still getting the error. Can someone assist with how I should maybe be calling this? I need to set user folders back to default for SOX compliance and I would rather have a backup of the fonts rather than overwriting the folder with a DMG of the folder, just in case there are fonts that the user require.
mkdir -m 777 /Users/Shared/FontsRemoved/ user=`/bin/ls -la /dev/console | /usr/bin/cut -d " " -f 4` fontsfolder=/Users/Shared/FontsRemoved/ "mv /$user/Library/Fonts/* $fontsfolder"