From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14218 invoked by alias); 27 Jun 2008 07:58:29 -0000 Received: (qmail 14205 invoked by uid 22791); 27 Jun 2008 07:58:28 -0000 X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.175) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jun 2008 07:58:03 +0000 Received: by wf-out-1314.google.com with SMTP id 28so373421wfc.20 for ; Fri, 27 Jun 2008 00:58:00 -0700 (PDT) Received: by 10.143.37.14 with SMTP id p14mr363401wfj.267.1214553479933; Fri, 27 Jun 2008 00:57:59 -0700 (PDT) Received: by 10.143.187.7 with HTTP; Fri, 27 Jun 2008 00:57:59 -0700 (PDT) Message-ID: <435f371f0806270057j2800bea2xbc430867110f62a8@mail.gmail.com> Date: Fri, 27 Jun 2008 08:09:00 -0000 From: "Florin Barbalau" To: cygwin@cygwin.com Subject: sourcing a perl script on cygwin In-Reply-To: <435f371f0806270055p7555331dt18cd8c868c7e208@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <435f371f0806270051g7734f46ai9be6649011a05cbe@mail.gmail.com> <435f371f0806270055p7555331dt18cd8c868c7e208@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2008-06/txt/msg00586.txt.bz2 Hello, I have a windows server 2003 installation and I try to sun a script for an Oracle patch installation. I installed cygwin. The files in question are two and they have more or less the following content: install_cdaa.sh ------------------------ #!/bin/sh # Check if ORACLE_HOME has been set if [ -z "$ORACLE_HOME" ] then echo "Set the ORACLE_HOME environment variable" exit 1 fi # Set the IFS_HOME variable export IFS_HOME=${ORACLE_HOME}/content ## ## Setting other environment variables # . ${IFS_HOME}/bin/system/ifssetenv.pl .... .... .... # EOF /////////////// then we have : ifssetenv.pl ------------------ #!/bin/perl # ifssetenv.pl # # Oracle Internet File System # Copyright (c) 2002, 2005, Oracle. All rights reserved. # # # This script sets the environment to run iFS. The only environment variable # you must manually set is ORACLE_HOME. The environment variables IFS_JAVA_HOME # and IFS_JAVA_COMMAND may be optionally set; otherwise default values will be # used. # # The environment variable IFS_INSTALL_ENVIRONMENT is reserved for Oracle use. # Do not set this environment variable in your install environment. # # Oracle recommends that you not change this script. # # # Set variables # # The Oracle instance in which iFS was installed; # Set by the iFS Configuration Assistant # use Cwd; use File::Basename; if (lc($^O) eq "mswin32") { $PSEP = ";"; } .... .... .... #EOF //////////////////////////////// ////////////////////////////// I take the following steps in a new cygwin windows: export ORACLE_HOME=/cygdrive/d/cdb_10_2 then If i run: $ /cygdrive/d/cdb_10_2/content/bin/system/ifssetenv.pl it works ok. but if I try to source as in the calling script (install_cdaa.sh) I get error messages. : $ . /cygdrive/d/cdb_10_2/content/bin/system/ifssetenv.pl bash: use: command not found bash: use: command not found bash: /cygdrive/d/cdb_10_2/content/bin/system/ifssetenv.pl: line 31: syntax erro r near unexpected token `$^O' bash: /cygdrive/d/cdb_10_2/content/bin/system/ifssetenv.pl: line 31: `if (lc($^O ) eq "mswin32")' do you have any ideea why? thanks, Florin -- 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/