X-Spam-Check-By: sourceware.org Date: Fri, 29 Sep 2006 12:03:51 +0200 From: Thomas Porschberg To: "Dr. Volker Zell" Cc: cygwin AT cygwin DOT com Subject: Re: sqlplus and end-of-line problem in shell script code Message-ID: <20060929120351.6f15d89b@porschberg.osp-dd.de> In-Reply-To: <828xk3ggls.fsf@vzell-de.de.oracle.com> References: <20060929102628 DOT 49430820 AT porschberg DOT osp-dd DOT de> <828xk3ggls DOT fsf AT vzell-de DOT de DOT oracle DOT com> X-Mailer: Sylpheed-Claws 2.1.0 (GTK+ 2.8.3; i686-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I do use Win2000 and a 9.2 Oracle database but I don't think it is related to that. Could you test it against an 9.2 database ? Can you send me the output from the `env` command ? Thank you for the first time. Oracle seems everywhere. Regards, Thomas P. Am Fri, 29 Sep 2006 11:35:43 +0200 schrieb "Dr. Volker Zell" : > >>>>> 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 AT MYDB < > 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/ > > > -- -- 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/