Disable printer sharing on mac OS X

#!/bin/bash
 
InstalledPrinters=$( lpstat -a | cut -d " " -f 1 )
SelectPrinters=$( echo "$InstalledPrinters" | grep _ )
 
for P in ${InstalledPrinters}
do
lpadmin -p $P -o printer-is-shared=false
 
done
date=$( date "+%m/%d/%y" )
echo "Yes on $date"

Leave a Reply

Your email address will not be published. Required fields are marked *

*