From owner-freebsd-questions@FreeBSD.ORG Sun Nov 30 01:19:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655E4106567C for ; Sun, 30 Nov 2008 01:19:05 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.freebsd.org (Postfix) with ESMTP id E79808FC13 for ; Sun, 30 Nov 2008 01:19:04 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so1027844nfh.33 for ; Sat, 29 Nov 2008 17:19:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=pwA6kbpmGMT4gadeZWrc/3UX3o1A+rL+vC8EF74wBjA=; b=VzUqH9+7He2fi2sSxdCnnUoEp1h7PSSqUP6smKh2pXyAJOaxV73o/4+ETvrslkHgO6 rQvuMG+Xh9BSbHJTOFoMwOO8A3WHgfYl9irqAOnhr7Ji1wQRdTm/7fsUzASgbkT/vLf+ gZATHwdQyRtYXrHts3UJ/IzlhNwAJOICU8Z2w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=lmGDjN8qiePUmuL3HqQrHQ8VGNNNkvhd03cB+4yVtBPB2Oxdt8n1qh1DvRf94J6eje 1ziqOqVwGsNQIW5qN2KpRmfTA2LdQD+89Ye7KSv16cMogKO17l2Ci/lXImyYuBGNhxIq yvZDmO3tIXMvi8XmOiJIB3NWHgpet6NN8elcI= Received: by 10.210.78.16 with SMTP id a16mr10850876ebb.33.1228007943162; Sat, 29 Nov 2008 17:19:03 -0800 (PST) Received: by 10.210.17.12 with HTTP; Sat, 29 Nov 2008 17:19:03 -0800 (PST) Message-ID: Date: Sat, 29 Nov 2008 18:19:03 -0700 From: "Tim Judd" To: perryh@pluto.rain.com In-Reply-To: <4930ff46.LVjmMuGTfhiq3N0y%perryh@pluto.rain.com> MIME-Version: 1.0 References: <4930ff46.LVjmMuGTfhiq3N0y%perryh@pluto.rain.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: shell scripting problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 01:19:05 -0000 This seems to be the ticket. I'll be watching it but now I have an example on how to dual-quote a string. Thanks very much, Perry On Sat, Nov 29, 2008 at 1:37 AM, wrote: > > In the shell script, i have a > > pkg_info -qLx "^$PKG-[0-9,._]+$" > > also tried (-X)tended regex instead of the standard rege(-x). > > > > sh keeps erroring out saying various $" isn't a valid variable > > name ... > > Both sh and csh will try to treat $ inside of "" as a variable > reference. Does it work any better if you enclose the $ in '' > instead? > > If you need the first $ to be a variable reference and the second > to be used literally, you may need to do something like > > "^$PKG-[0-9,._]+"'$' >