X-Spam-Check-By: sourceware.org
X-Mailer: 21.4 (patch 19) "Constant Variable" XEmacs Lucid (via feedmail 10 I)
To: cygwin@cygwin.com
Subject: Re: sqlplus and end-of-line problem in shell script code
References: <20060929102628.49430820@porschberg.osp-dd.de>
From: "Dr. Volker Zell" <Dr.Volker.Zell@oracle.com>
Date: Fri, 29 Sep 2006 11:35:43 +0200
In-Reply-To: <20060929102628.49430820@porschberg.osp-dd.de> (Thomas Porschberg's message of "Fri, 29 Sep 2006 10:26:28 +0200")
Message-ID: <828xk3ggls.fsf@vzell-de.de.oracle.com>
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (cygwin32)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>>>>> Thomas Porschberg writes:

    > Hi,
    > I want to use our shell script collection which includes sqlplus calls
    > under Cygwin.
    > I have the following problem with this code snippet:

    > #!/bin/bash

    > RESULT=`sqlplus -s myuser/mypasswd@MYDB <<EOF
    > SET FEEDBACK OFF;
    > SET PAGESIZE 0;
    > SELECT '42' FROM DUAL;
    > EOF`

    > if test "$RESULT" = "42" ; then
    > echo "Result is 42..."
    > else
    > echo "Result is not 42 ??!"
    > fi

    > When I run the script on UNIX it prints "Result is 42..." which is OK.
    > When I run the script under Cygwin the result is: "Result is not 42??!"

This is what I just got with your code against the latest Oracle 10g
database on Windows XP:

./checkSQLPLUS.sh 
Result is 42...

Ciao
  Volker


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

