Posted on 01-16-2017 12:42 PM
I have a script below that enables me to remove .ttf and .otf fonts from the users directory. It runs fine but when I look at the logs in the jss it doesnt tell me what it removed only that it completed. How can I put something in this script that tells me which fonts it removed?
#!/bin/sh
find /Users/ -type f -name "*.ttf" -exec rm -f {} ;
find /Users/ -type f -name "*.otf" -exec rm -f {} ;
exit 0
Solved! Go to Solution.
Posted on 01-16-2017 12:56 PM
Are you removing all the fonts?
If not, you could do something like this:
#!/bin/sh
ttfFonts=$(find /Users/ -type f -name "*.ttf")
otfFonts=$(find /Users/ -type f -name "*.otf")
echo "$ttfFonts"
echo "$otfFonts"
Then do your removal.
Posted on 01-16-2017 12:56 PM
Are you removing all the fonts?
If not, you could do something like this:
#!/bin/sh
ttfFonts=$(find /Users/ -type f -name "*.ttf")
otfFonts=$(find /Users/ -type f -name "*.otf")
echo "$ttfFonts"
echo "$otfFonts"
Then do your removal.
Posted on 01-16-2017 01:12 PM
Thanks!