10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Example of problem:
computerhand=(6H 2C JC QS 9D 3H 8H 4D)
topcard=6D
How do you search ${computerhand} for all elements containing either a "6" or a "D" then
save the output to a file?
This is a part of a Terminal game of Crazy 8's that I'm attempting to write in Bash.
Any... (2 Replies)
Discussion started by: cogiz
2 Replies
2. Shell Programming and Scripting
Hi All,
need help with reading the array and sum of the array elements.
given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large.
Input Format
The first line of the input consists of an... (1 Reply)
Discussion started by: nishantrefound
1 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
4. HP-UX
Hi
I'm writing a shell script that connects to oracle database and fires query to check the availability of data in a table. In case of no data found then what will be the return code and how to handle in that in variable. Kindly provide with an example for better understanding... Thanks... (1 Reply)
Discussion started by: ksailesh
1 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
i have written a shell scipt to call a procedure and get the value back from procedure.But i am facing the issue like
#!/bin/sh
returnedvalue=`sqlplus -s userid/pass<<EOF
set serveroutput on;
exec pass($1)
set serveroutput off;
EXIT;
EOF`
flag=`echo $returnedvalue `
echo "$flag"... (2 Replies)
Discussion started by: ravi214u
2 Replies
6. Shell Programming and Scripting
Hi All,
I am using the following piece of script to print all the array elements in a script by name compare.sh:
31 len=${#array
};
32 j=0;
33 #echo "The length of the array is : $len"
34 while ; do
35 temp=${array}
36 echo "$temp"
37 let $j++
38 done
But I am getting the... (2 Replies)
Discussion started by: ananddr
2 Replies
7. Shell Programming and Scripting
Hi,
Please can someone help to return the array elements from a function. Currently the problem I face is that tempValue stores the value in myValue as a string while I need an array of values to be returned instead of string.
Many Thanks,
Sudhakar
the function called is:
... (5 Replies)
Discussion started by: Sudhakar333
5 Replies
8. Shell Programming and Scripting
I am using the following code in my shell script
list=`sqlplus -s $user/$pwd@$dbms<<EOF
WHENEVER SQLERROR EXIT SQL.SQLCODE
set pagesize 0 feedback off verify off heading off echo off
select * from control_tbl
where src_nm=$3
and extrct_nm=$4;
exit SQL.SQLCODE;
EOF`
ERROR=$?... (1 Reply)
Discussion started by: Vikas Sood
1 Replies
9. Shell Programming and Scripting
Hi friends,
I have to do the following things :
1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)
Discussion started by: sveera
3 Replies
10. UNIX for Advanced & Expert Users
I'm attempting to populate an array in ksh using the following command:
set -A $(SELECT_INVOICE | sed '/^$/d')
SELECT_INVOICE is a function that executes the SQL query.
Problem: Some of the invoice numbers have alpha characters with spaces(example: OVEN MICRO). The Korn shell is treating... (1 Reply)
Discussion started by: kdst
1 Replies