delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/27/03:58:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <435f371f0806270057j2800bea2xbc430867110f62a8@mail.gmail.com>
Date: Fri, 27 Jun 2008 09:57:59 +0200
From: "Florin Barbalau" <florin DOT barbalau AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: sourcing a perl script on cygwin
In-Reply-To: <435f371f0806270055p7555331dt18cd8c868c7e208@mail.gmail.com>
MIME-Version: 1.0
References: <435f371f0806270051g7734f46ai9be6649011a05cbe AT mail DOT gmail DOT com> <435f371f0806270055p7555331dt18cd8c868c7e208 AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019