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??...what is exit 1 mean. Any clarification is greatly appreciated.
export ST=$1
export EN=$2
if [ ${#ST} -eq 0 ]
then
echo ${#ST}
echo ${ABORT} " START_STEP environment variable must be present"
echo "Process cannot be executed"
exit 1
fi
if [ ${#EN} -eq 0 ]
then
echo ${ABORT} " END_STEP environment variable must be present"
echo "Process cannot be executed"
exit 1
fi
The 'exit' command is how programmers should end their programs. It is the cleaner way to program. That said, if a program runs normally and ok, the last line would be an
If there were problems, and in your case you are checking for two kinds of problems, you should terminate the script execution with
The reason for this is that you can tell if there was a previous problem in the prior executed program/script. Code like the following:
As time goes on, you could provide more info by associating error numbers to error text. One you probably see a lot on the internet is the "404" meaning page not found. Some websites know to anticipate a 404, and therefore provide better messages than just "error - page not found".
Hello,
I have researched and tried many way to pass OUT parameter to be stored in variable in KSH Script.Still not success, please help.
Here is my Store Procedure.
create procedure testout3(v_in varchar2,v_out OUT integer)
as
begin
v_out := 1;
end;
Here is my testvout.ksh
#!/bin/ksh... (1 Reply)
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)
Hi,
I am getting the below error message When i am trying to delete the files from the directory.Could you please guide me?
rm *.aud
ksh: /usr/bin/rm: 0403-027 The parameter list is too long.
and
find /oracle/admin/testP/adump/*.aud -mtime +5 -exec rm {} \;
ksh: /usr/bin/find:... (3 Replies)
Hi all
Im calling a DB procedure as foll
sqlplus -s $DB_USERID/$DB_PASSWD@$DB_NAME<<eof
var var1 VARCHAR2(200);
exec ODAS_BATCH_JOBS_RETRIEVE.retrieve_user_info(:var1);
eof
echo $var1
This echo is giving a blank.
Also in case the package ODAS_BATCH_JOBS_RETRIEVE is in an un compiled... (2 Replies)
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)
Hi all,
I'm having a rather peculiar problem involving parameter passing with declared functions in my shell script. Hope to get some advice here.
A brief description of my code is as follows:
However, I'm not getting the results I wanted. If I pass in $rdir, I'm going to end up... (4 Replies)
hi everybody!
i am running this ksh script for replacing a set of strings by another set of new ones. i am getting both these from a file.
also, the strings that i want to replace, are sub-strings(can occur more than once in each chunk) in a big chunk of data that i have bulk-copied(bcp utility)... (1 Reply)
is it possible? Because I know we could use
open(A, `abc.ksh`);
to access a ksh, but is it possible to access just one (or more) function from the ksh script? (2 Replies)
Having the following message returned:
FIND REDLOG FILES.....
ksh: dbfFILe: parameter not set
When I attempt to perform the script below....#!/bin/ksh
. $HOME/.profile
# Initial Script Prerequisites
ORACLE_SID=MDirect ; export ORACLE_SID
REDOLOGDIR=$ARCLOGDEST ; export REDOLOGDIR... (2 Replies)
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)