From owner-freebsd-questions Wed Jan 16 22:31:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from Mail6.Carolina.rr.com (fe6.southeast.rr.com [24.93.67.53]) by hub.freebsd.org (Postfix) with ESMTP id 3435537B416 for ; Wed, 16 Jan 2002 22:31:43 -0800 (PST) Received: from snafu.enterit.com ([66.57.159.198]) by Mail6.Carolina.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Wed, 16 Jan 2002 23:28:32 -0500 Message-Id: <5.1.0.14.0.20020116235101.044e8830@mail.enterit.com> X-Sender: jconner@enterit.com@mail.enterit.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 16 Jan 2002 23:52:32 -0500 To: "Drew Tomlinson" From: Jim Conner Subject: Re: Regular Expression Syntax Cc: In-Reply-To: <5.1.0.14.0.20020116233839.044e0550@mail.enterit.com> References: <000b01c19f00$d396db20$0301a8c0@bigdaddy> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Doh, I just re-read your question. Ok. Let me redo my answer. All you have to change is your first grep. pkg_info | egrep -v 'portupgrade|cvsup' | awk '{print "pkg_deinstall " $1}' That should work - Jim At 23:40 01.16.2002 -0500, Jim Conner wrote: >If I am reading your question correctly, you want everything except cvsup >and portupgrade. Therefore, do this: > >pkg_info | egrep "portupgrade|cvsup" | awk '{print "pkg_deinstall " $1}' | >egrep -v 'portupgrade|cvsup' > > >- Jim > >Philosophy is for those who have nothing better to do than wonder >why philosophy is for those who have nothing better to do than... > > >At 18:44 01.16.2002 -0800, Drew Tomlinson wrote: >>I've been beating my head and just can get the syntax of this right. >>This expression works: >> >>blacklamb> pkg_info | egrep "portupgrade|cvsup" | awk '{print >>"pkg_deinstall " $1}' >>pkg_deinstall cvsup-16.1_3 >>pkg_deinstall portupgrade-20011210 >> >>How can I get the opposite? In other words, everything except cvsup >>or portupgrade? I know about the ! and () for grouping but can't seem >>to get it in the right place. Help. >> >>TIA, >> >>Drew >> >> >>To Unsubscribe: send mail to majordomo@FreeBSD.org >>with "unsubscribe freebsd-questions" in the body of the message > >-----BEGIN PGP PUBLIC KEY BLOCK----- >Version: GnuPG v1.0.6 (MingW32) >Comment: For info see http://www.gnupg.org > >mQGiBDxAonQRBACx+sz63XIeo5uTzc5n3Elf7Y13VVZGIM8Pilp3LpBu70/nGQPu >anKYDB3aa1U5cfl+cTK5lOtUxN7Fu0a2Uv0ApIlC1qA8CjDZqlu7PDETFTVrpfGZ >007BHO+y2Y0bVsaMPXdnhbi0LAFSIkNYRhyzNWbAkeMsgA+i2k9hcnhvVwCgor7P >nflXu7xWN9aWt3RJBzqdUR0EAK/1obJFUKQSK39cKTMPQ4u2UPflbS5dJ871naG5 >xBAlQAjHAXT+f/fXE2ezrSyoQnlOD4kVbPN3gB5UT5mWoylPuf5W7WmupthVzUUN >IsPDbmAT0YOwgALCfJVS+PrPCC8opmZhTjQBwgxCSY9MWULlzN3X2EEDqWIxluYb >o5W/BACgHA+aFOO5F03QZBBScWn9YBS1ZH3sSlkQEK5RiwGXLmHJacOjn660SbOE >MEKPDLDDJu/vt1fb3VRLc/fPB3aB7fi4XagfobaHbID9rx55slLhD94Q+5JuJSfg >DyJ+vVSA1k+9/SynflPl0QY5zt0xSM+0CBg9mBg2bPyuGsDwXLQ5SmltIENvbm5l >ciAoTmV3IEdQRyBLZXkgZm9yIFNuYWZ1WCkgPGpjb25uZXJAZW50ZXJpdC5jb20+ >iFcEExECABcFAjxAonQFCwcKAwQDFQMCAxYCAQIXgAAKCRDmnFh04+r7ZdFiAKCh >t8Vq7ZT6qvh9Dzn0lzZXRM4gywCfSLU/H5UHX7ZoxapfDs9pLxEEZeO5Ag0EPECj >chAIAIsdwiPqW8IsumvpXu59qkfsi4H2nofxvbhMDiapEhgloydehNQOEiHwC/O1 >a06PjUmNRLRdK88kjy99R84ILbWUJZUclQB2LcjlttnrIG/FzCMxoLTKOeOCJk8N >ONswBdJdcf/XqbWJBTs/MXeNf4rmShYi6WJ5+jc1IE5PXGf4SR/9bz2r+/GESlrX >tAoNtWl5a/NUxb6b0hR6zU9Y6oO1vpDDJNbcV9mafdYhsvoFYdD2c6JF+JoN+FHR >tEP3k6leYwQ5P0kuUQNgWdWNWZfBq1tQDBfhg1/AV0JBzamyJfd0prFmtUEemKx4 >haDsOoT4gLSPNTqSsyDt6TNLtGMAAwUIAINeot1FVpree5bvhy3xL+Pr1UGb++DM >b8Qeer6ERkVQNx7YoU8hfpqOwvEQMyfb9s6HPfSWRUfQRF+g+9ohPgYkH+1nqH3V >PtGSw1kgLOqxZQTVPEcAMhSflt9LSJETIQQByKKh1e5RvOuApwBFmQq3syRhzqv/ >j2b6t3IqAB9WR5TnoYkdUtTWM9MGubiFl5B9uH5EHWAlFF8h760U7Xp9m1J3qTyH >EJqjfGj2SP2DK5cisuWOWdPy5aSqT7ZKrcKeSTDUyiHclI1ygFHue8oO0HXqrs+k >KjFdRqIKnzfY9gW/b/6gLHhBDV6BoA9w6+1Y9egOByRcVonE8zY/xMeIRgQYEQIA >BgUCPECjcgAKCRDmnFh04+r7ZcyDAJ4ogYX7W4u8g+QJsksyL4Ld+dObCwCfU7hB >7I3ZgTsYwP6mr5RPjkH5PG8= >=QOu8 >-----END PGP PUBLIC KEY BLOCK----- > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.0.6 (MingW32) Comment: For info see http://www.gnupg.org - Jim Philosophy is for those who have nothing better to do than wonder why philosophy is for those who have nothing better to do than... mQGiBDxAonQRBACx+sz63XIeo5uTzc5n3Elf7Y13VVZGIM8Pilp3LpBu70/nGQPu anKYDB3aa1U5cfl+cTK5lOtUxN7Fu0a2Uv0ApIlC1qA8CjDZqlu7PDETFTVrpfGZ 007BHO+y2Y0bV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H3V PtGSw1kgLOqxZQTVPEcAMhSflt9LSJETIQQByKKh1e5RvOuApwBFmQq3syRhzqv/ j2b6t3IqAB9WR5TnoYkdUtTWM9MGubiFl5B9uH5EHWAlFF8h760U7Xp9m1J3qTyH EJqjfGj2SP2DK5cisuWOWdPy5aSqT7ZKrcKeSTDUyiHclI1ygFHue8oO0HXqrs+k KjFdRqIKnzfY9gW/b/6gLHhBDV6BoA9w6+1Y9egOByRcVonE8zY/xMeIRgQYEQIA BgUCPECjcgAKCRDmnFh04+r7ZcyDAJ4ogYX7W4u8g+QJsksyL4Ld+dObCwCfU7hB 7I3ZgTsYwP6mr5RPjkH5PG8= =QOu8 -----END PGP PUBLIC KEY BLOCK----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message