ksh: dbfFILe: parameter not set


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh: dbfFILe: parameter not set
# 1  
Old 05-04-2005
ksh: dbfFILe: parameter not set

Having the following message returned:

FIND REDLOG FILES.....
ksh: dbfFILe: parameter not set


When I attempt to perform the script below....
Code:
#!/bin/ksh
. $HOME/.profile
# Initial Script Prerequisites
ORACLE_SID=MDirect ; export ORACLE_SID
REDOLOGDIR=$ARCLOGDEST ; export REDOLOGDIR
dbfFILE=$REDOLOGDIR/dbflist.txt ; export dbfFILE

# Log into Oracle to perform Switch of REDOLOGS.
echo "Oracle to perform SWITCH."
sqlplus /nolog << EOF
connect / as sysdba ;
alter system switch logfile ;
EOF

# Take a nap (300=5min)
echo "SLEEP TIME (5mins)"
sleep 300

cd $REDOLOGDIR/tmp
# Find all .dbf files newer than the timefile and put listing into
# the dbfFILE to be read.
echo "FIND REDLOG FILES....."
find $REDOLOGDIR -name \*.dbf -type f -newer $REDOLOGDIR/tmp/timefile -exec ls {
} \; > $dbfFILE

while read dbfEntry; do

  echo $dbfEntry
  echo "cp: " $REDOLOGDIR/$dbfEntry " to " $REDOLOGDIR "/tmp"
  cp $REDOLOGDIR/$dbfEntry .
  echo "compress :......."
  compress *.dbf

  echo "cp: to MDDEV/U02/...."
  cp -p $REDOLOGDIR/tmp/*.Z /mddev/u02/oracle/admin/MDirect/arch

  if [ $? != 0 ]
    then
      echo
      echo "ERRORS encountered with Redolog Move"
      echo "with file: " $dbfEntry
      echo
      rm $REDOLOGDIR/tmp/*.dbf*
      exit    # EXIT from script.
    else
      echo "rm: " $REDOLOGDIR"/tmp/"$dbfEntry
      rm $REDOLOGDIR/tmp/*.dbf*
      echo "TOUCH PERFORMED..."
      touch $REDOLOGDIR/tmp/timefile
  fi

done < $dbfFILe

I initially thought it was a result of the FIND statement and have tried redirecting the output of the `-exec ls {}` statement in the above form and (initially)...
find $REDOLOGDIR -name \*.dbf -type f -newer $REDOLOGDIR/tmp/timefile -exec ls {} > $ dbfFILE \;

Any suggestions? Not sure what to do to resolve.
# 2  
Old 05-04-2005
The last character of the script is wrong. Change the "e" to a "E".
# 3  
Old 05-04-2005
How very sad.
Many thanks Perderabo for highlighting my inability to read. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Solaris "ksh" Parameter Not Set

Getting the following when I try to set -u or set -o nounset in ksh on Solaris. Anyone ever seen this? Using an account I just built so everything is default and default shell is set to ksh. Oracle Corporation SunOS 5.11 11.3 September 2015 bar@solaris11:~$ echo $0 -ksh bar@solaris11:~$ set... (3 Replies)
Discussion started by: epost
3 Replies

2. Shell Programming and Scripting

Can't set parameter to lynx properly

My intention is to go through list of addresses and call google geocode api for each of them. I am using lynx for this, but somehow I can't supply the parameters to it in a proper way. To show that my parameters are OK I just hardcoded one address in my script and put it in my input file, and... (2 Replies)
Discussion started by: migurus
2 Replies

3. Shell Programming and Scripting

"ksh: XYZ: parameter not set" in .profile

Hi, A very basic query. I am working on two different UNIX servers and I see different behaviours for my user id. This has to be a setting in the .profile, but I can't seem to find where :confused: So, in one server if I type echo $XYZDD (a random variable), I get a blank line with no... (2 Replies)
Discussion started by: ALDonP
2 Replies

4. UNIX for Dummies Questions & Answers

How to pass a parameter to an alias in ksh?

I want to do something like this: alias cd2="cd /data_saves/$(/opt/bin/util/getcustdb -i $@)" Where /opt/bin/util/getcustdb is an inhouse script to lookup customer db name based on a provided id number Then when I use the alias I can cd2 4567 and have it run "/opt/bin/util/getcustdb -i... (3 Replies)
Discussion started by: JourneyRider
3 Replies

5. Shell Programming and Scripting

Dot operator and space, Parameter not set

Hi, i have this script setenv.sh if then echo "is empty" fi echo "done" The following is the result when i run the script from command without and with a dot and space operator $ setenv.sh is empty done $ . setenv.sh sh: VAR_1: Parameter not set. $ It's our standard to run... (5 Replies)
Discussion started by: ysrini
5 Replies

6. Shell Programming and Scripting

KSH list as function parameter

Hello, Could anyone help me with some KSH syntax? I'm trying to pass a list as a function parameter in a KSH? For example I have code like this: print_counter() { N=$1 C=$2 for A in $C; do echo "This is $N number $A" done } NAME=BRICK COUNT=" 1 2 3 4" ... (2 Replies)
Discussion started by: pn8830
2 Replies

7. UNIX and Linux Applications

set mysql password with host parameter

hi, linux gurus... i'm trying to write a script in ksh called ResetPass that allows a user to change mysql passwords. the script accepts user, password and host like this: ResetPass <user> <password> <host>. here's the code: ***************************************************** mysql... (1 Reply)
Discussion started by: ankimo
1 Replies

8. Shell Programming and Scripting

Accessing the Value of a parameter in KSH

Hi I am new to this forum. Please forgive me, If I am wrong anywhere. I am trying to understand the below code. Can anyone help in understanding what is ${#ST} here. Is that the value of the first parameter??:confused:...what is exit 1 mean. Any clarification is greatly appreciated. export... (3 Replies)
Discussion started by: suaven
3 Replies

9. UNIX for Dummies Questions & Answers

DEBUG_PROG and opts: parameter not set

I am using a Sun Ultra 30 with 250MG of RAM and 9GIG of hard drive. I connect to the machine via Exceed 6 and have the Oracle8i for Solaris in the cdrom drive. I have read and complied with Oracle's instruction in preparation to installing Oracle. Since I don't have enough space to cp the content... (1 Reply)
Discussion started by: Alexxx14
1 Replies

10. Shell Programming and Scripting

ksh parameter --- change

I am reading a file into a parameter in my program typeset nums_type if the contents of nums_type = asdfghbqwerty how do make a new paremeter eqaul to the 7th character of nums_type. like ${type} = b (2 Replies)
Discussion started by: frank
2 Replies
Login or Register to Ask a Question