[SunHELP] find in file script..
Adrian.Florea at alcatel.ro
Adrian.Florea at alcatel.ro
Wed Jun 11 08:31:58 CDT 2003
try this:
--- begin ----
#!/bin/sh
PRINTERNAME=`awk '{if ($1 ~ /printer_ip/) { print $2; exit}}' /etc/hosts`
if sed -e "/$PRINTERNAME/d" /etc/hosts >/etc/hosts.new; then
cp /etc/hosts.new /etc/hosts
fi
lpadmin -x $PRINTERNAME
--- end ----
if is not working tell me because I've put the script without test ...
Adrian.
On Tue, 10 Jun 2003 Enjoyer at aol.com wrote:
> Hello,
>
> Does anyone know some good locations to find Solaris scripts... ?
>
> I'm trying to find a "printer" in /etc/hosts... remove it... then run
> lpadmin -x "printer",
>
> Thank you.
> Paul
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
More information about the SunHELP
mailing list