Re: Fast personal printing _without_ CUPS

看板FB_questions作者時間14年前 (2011/10/28 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串12/56 (看更多)
--2Z2K0IlrPCVsbNpk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Ronald F. Guilmette on Thursday, 27 October 2011: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > #!/bin/sh >=20 > printer=3D'/dev/ulpt0' >=20 > if [ $# =3D 0 ]; then > cat | /usr/local/libexec/psif > $printer > else > for arg in $* ; do > cat $arg | /usr/local/libexec/psif > $printer > done > fi Not to be a pedant (okay, maybe I am), but you could eliminate the extraneous `cat` in both commands: #!/bin/sh printer=3D'/dev/ulpt0' if [ $# =3D 0 ]; then /usr/local/libexec/psif > $printer else for arg in $* ; do /usr/local/libexec/psif < $arg > $printer done fi Nice work, though! --=20 =2EO. | Sterling (Chip) Camden | http://camdensoftware.com =2E.O | sterling@camdensoftware.com | http://chipsquips.com OOO | 2048R/D6DBAF91 | http://chipstips.com --2Z2K0IlrPCVsbNpk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJOqZuLAAoJEIpckszW26+RQQsH/RlHBKfxvDzKL1Nc2MUFppzz uKc1NVfEbQjeKanGpmJ5yyILpD8ATtM1Jfv62/tt9Wk1AndjDCxKmh/Ik2jXr2IV pWBKVckZStun0QoLgmK3XOuUFU/lRylBLWaaZ8MdC00sZJtQWYHICpvEAYJktEVC nTwIdBbPCT9oGGj0E3gn2oAWWcDLinAhf3b/ZTiGZXCSLqnpFfrxewIkoLAL8UA4 A8HvsROTGZfE9HNIiYAvh8WsipvJuUC2TpSbIvqORV3c4EbJUKVvHwdeamt7W5bW ws5w0FDjRAfCMIXdcP2Vg3JWwrjITc94bh0rnvrY0aKBOxHnCEjV1fTOWQDokZ0= =aLxp -----END PGP SIGNATURE----- --2Z2K0IlrPCVsbNpk--
文章代碼(AID): #1EgPnbhq (FB_questions)
討論串 (同標題文章)
文章代碼(AID): #1EgPnbhq (FB_questions)