Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 089A11337B79 for ; Thu, 27 Jan 2011 02:11:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 47869-01 for ; Thu, 27 Jan 2011 06:11:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mail.postgresql.org (Postfix) with ESMTP id 44C7E1337B6E for ; Thu, 27 Jan 2011 02:11:19 -0400 (AST) Received: by wwf26 with SMTP id 26so1812317wwf.19 for ; Wed, 26 Jan 2011 22:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=B4rx9FMGVlPxPpEimY0G6II4Lt0jb6o262TwhLl0KCA=; b=cQRuRUmQIzZHEfvmgbd1F/pf2CtmVPOMO6kfnTE1jFylAJceHfXQxC+QNItACeEnBh omTjJgmvNrDGi84n68TWR8h2BHzpp7dp4P+JvxhImuNI6mZNYNxBH7ZQjLh943NX8c3B MlzkAKQROK3FydANx6tVls7zobrk1QPAgh7xY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=j0AEiUv0yRgNNX82+nWheHjqo1Udjh1o8xpBhwQKGzoGw/L50ETeQj3K2EewZy84ga H/Nl1xx2ti9eGPTkiUOVHhuQC+p0CiABWu/CzvVfpcXmuGkA3AnCY+wJjwKhHwCJy66r bAzvmjEHnB2zVNwHEH2Ev58ntBVgoRf50E+hA= MIME-Version: 1.0 Received: by 10.227.147.16 with SMTP id j16mr529779wbv.125.1296108677905; Wed, 26 Jan 2011 22:11:17 -0800 (PST) Received: by 10.227.11.83 with HTTP; Wed, 26 Jan 2011 22:11:17 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Jan 2011 23:11:17 -0700 Message-ID: Subject: Re: Compare the resulta of a count sql into bash From: Scott Marlowe To: manuel antonio ochoa Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201101/97 X-Sequence-Number: 35044 On Wed, Jan 26, 2011 at 10:07 AM, manuel antonio ochoa wrote: > > Hello, > I have the next : > > COUNTONE=3D`/var/lib/pgsql/bin/./psql -U 'Thor'=A0=A0 -d princlocal -p 54= 32 -h > 192.170.1.82=A0 -c "select count(*) from monterrey.${NOMBRETB}"` > COUNTTWO=3D`/var/lib/pgsql/bin/./psql -U 'Thor'=A0=A0 -dprinclocal -p 543= 2 -h > 192.170.1.82=A0 -c "select count(*) from monterrey.$nombre where recibo > between '$FI' and '$FF'" > > I want to compare the result countone with countwo=A0 how does it works= =A0 ? echo $((COUNTONE-COUNTTWO));