Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with Unix function

Status
Not open for further replies.

grapes12

Technical User
Mar 2, 2010
124
ZA
how can I amend this function to include deleting a printer.
Code:
function printerExists()
{
if [ $prExists -eq 1 ]; then
  echo "Printer already exists. Skipping: \"$prName\""
else
  # Add Printer Command 
  lpadmin -p "${prName}" -E -D "${prDescript}" -L "${prLocation}" -i /u1/cups/mac/"$prFilter_filter -v \
  "$Prdriver"://"${prAddress}":"Prport"
fi

how can i amend this function to include the delete lpadmin -x printer command
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top