bash array passed to oracle


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting bash array passed to oracle
# 1  
Old 04-09-2006
Bug bash array passed to oracle

Hi all..

Does anyone know have an example of passing the contents of a bash array to oracle?

basically I am looking to loop through the contents of a file(not csv!) and store each line into a bash array. Once i have this I can then pass the array into an oracle procedure that accepts an array as an argument and process it from there..

any code snippets would be brilliant?!

Kind Regards

Satnam
# 2  
Old 11-28-2008
Quote:
Originally Posted by satnamx
Hi all..

Does anyone know have an example of passing the contents of a bash array to oracle?

basically I am looking to loop through the contents of a file(not csv!) and store each line into a bash array. Once i have this I can then pass the array into an oracle procedure that accepts an array as an argument and process it from there..

any code snippets would be brilliant?!

Kind Regards

Satnam
Hi Dude

Have you got any reply
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Array connectin to another Array

Hello, i have a script that i need account_number to match a name. for exsample : ACCOUNT_ID=(IatHG8DC7mZbdymSoOr11w KbnlG2j-KRQ0-1_Xk356s8) and i run a loop curl requst with this the issue is that i want to know on which account were talking about so bash will know this : ... (4 Replies)
Discussion started by: batchenr
4 Replies

2. Shell Programming and Scripting

Bash arrays: rebin/interpolate smaller array to large array

hello, i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N. for case 1, I want to stretch N to fit M arrayHuge H = (... (2 Replies)
Discussion started by: f77hack
2 Replies

3. Shell Programming and Scripting

Bash variable not being passed

In the bash below the variable date displays in the echo. However when I use it in the for loop it does not. Basically, the user inputs a date then that date is converted to the desired format of (month-day-year, no leading 0). That input is used in the for loop to return every file that matches... (5 Replies)
Discussion started by: cmccabe
5 Replies

4. Shell Programming and Scripting

Multiple bash variables passed into nawk

I have a file that has 2 fields called b_file: 11977 DAR.V3.20150209.1.CSV 3295 DAR.V3.20150209.1.CSV 1721 DAR.V2.20150210.1.CSV I need to search a sftplog using the field 1, but want to maintain the relationship between field 1 and 2. I am passing field 1 as a parameter in a bash loop. ... (14 Replies)
Discussion started by: smenago
14 Replies

5. Shell Programming and Scripting

[BASH] getopts, OPTARG is passed but empty

EDIT: -- SOLVED -- Heyas, Getting used to optargs, but by far not understanding it. So i have that script that shall be 'changeable', trying to use the passed arguments to modify the script visuals. Passing: browser -t test -d sect $HOME Where -t should change the title, and -d... (0 Replies)
Discussion started by: sea
0 Replies

6. Shell Programming and Scripting

Bash 3.2 - Array / Regex - IF 3rd member in array ends in 5 digits then do somthing...

Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help. pesudo code if == ENDSINFIVEINTS ]]; then do... (4 Replies)
Discussion started by: briandanielz
4 Replies

7. Shell Programming and Scripting

Store args passed in array but not the first 2 args

Store args passed in array but not the first 2 args. # bash declare -a arr=("$@") s=$(IFS=, eval 'echo "${arr}"') echo "$s" output: sh array.sh 1 2 3 4 5 6 1,2,3,4,5,6 Desired output: sh array.sh 1 2 3 4 5 6 3,4,5,6 (2 Replies)
Discussion started by: iaav
2 Replies

8. Shell Programming and Scripting

Store all the passed arguments in an array and display the array

Hi I want to write a script which store all the parameters passed to the script into an array. Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD. I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies

9. Shell Programming and Scripting

Parameters passed to commands but not working in Bash shell

Hi, I am trying to do this thing useing my shell bash ( sorry for my english ) I have in a file 63 hostnames, i wanna ask to the DHCP admin, to reserv that reserves 63 IP addresses of this hosts, using their mac address. I have thinked this script: for ((i=1;i<63;i++)); do arp $(head... (10 Replies)
Discussion started by: Cypress
10 Replies

10. Shell Programming and Scripting

Perl script variable passed to Oracle query

Hi All, I pass a Perl script variable, whch is passed to a query to be prepared. But the problem is I have special character like '&' in this variable which are handled in a special way by the Oracle query parser. How do I get over this? my $cust_name='A&B'; my $sql="Select cust_short_name... (1 Reply)
Discussion started by: rahulrathod
1 Replies
Login or Register to Ask a Question