Sponsored Content
Full Discussion: Reading from array
Top Forums Shell Programming and Scripting Reading from array Post 302564294 by ratheeshjulk on Thursday 13th of October 2011 09:12:30 AM
Old 10-13-2011
Reading from array

Hi,
I have an array like below...

Code:
Table[0]="table1"
Table[1]="table2"
Table[2]="table3"
Table[3]="table4"
.....
Table[n]="tablen"

I want to retireve the values from the array and need to pass this to a db2 command to create a view like below.
the number of values in the array will vary

Code:
CREATE VIEW table AS
 SELECT col1, col2,col3
  FROM Table[0] A0, Table[1] A1 ...Table[n]

any help..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading from while loop into an array

Hi I have something like cat $HOME/all_dirs | while read ln_old_dirs do if then echo "$ln_all_old_dirs" fi done As you know that the variable ln_all_old_dirs is not accessable from outside the... (2 Replies)
Discussion started by: ssuresh1999
2 Replies

2. Shell Programming and Scripting

Reading Of Array Element in Unix

Hi, I am using the following command to initialize and array # arr=ffffff00 # echo $arr ffffff00 my requirement is i want to fetch the one by one character from array. I don't know how to fetch one by one charcter from array. Please i need an help. Thank you very much Ravi R N (2 Replies)
Discussion started by: ravi_rn
2 Replies

3. Shell Programming and Scripting

awk reading many fields to array

I want to read $3,$4,$5,$6,$7 of fileA in array and when fileb $1 = fileA $4 the i want to print array and few fields from fileB. This should work but has some syntax error. nawk -F, 'FNR==NR{a=;next} a{print a}' fileB fileA Appreciate if someone can correct this. (2 Replies)
Discussion started by: pinnacle
2 Replies

4. UNIX for Dummies Questions & Answers

Reading a file into an array

I have a file that is a text file, how to get all the words into and array, i am able to get each line but not each word :(. Here is what i searched and already found...https://www.unix.com/shell-programming-scripting/99207-pipe-text-file-into-array.html. This one reads a whole line into... (6 Replies)
Discussion started by: SasankaBITS
6 Replies

5. Shell Programming and Scripting

reading values into an array

I have this portion of a script and it works: base_config="A B C D E" for field in $base_config do var=`echo $field` ((i=$i+1)) done I get an array of var=A, var=B, and so on. What if I have this example with white space and want to put it into an array while... (1 Reply)
Discussion started by: djehresmann
1 Replies

6. Shell Programming and Scripting

help with reading command line into array

set -A title set -A author count=1 index=0 while do read -A ${title}?"Booktitle: " read -A ${author}?"Author(s): " (( count = count + 1 )) (( index = index + 1 )) done Hi... (1 Reply)
Discussion started by: bjhum33
1 Replies

7. Shell Programming and Scripting

Help with reading column in array

I have some version problem to use this code in my server while read line; do read -A array <<<$line <---------- the server dont read <<< n=${#array} for ((i=1;i<$n;i++)); do print "${array}" done func=${array} data1=${array} data2=${array} ... (1 Reply)
Discussion started by: gavin_L
1 Replies

8. Shell Programming and Scripting

Reading a file into array

Hi, I need to read a file into array and print them in a loop:- 1st file :-cat a.txt RC1 RC2 RC3 RC4 My Program:- #!/bin/ksh index=0 while do read cnt<a.txt print "cnt value is ${cnt} index=`expr $index + 1` done Code tags for code, please. (5 Replies)
Discussion started by: satishmallidi
5 Replies

9. Shell Programming and Scripting

Reading a file into an array

Hi I have a file with contents as below : server | ABC Issue : File System Missing XYZ Issue : Wrong Syntax PQR Issue : Old File to be removed Now I am looking for an o/p similar to server <tab> ABC Issue : File System Missing <tab> XYZ Issue : Wrong Syntax <tab>... (4 Replies)
Discussion started by: deo_kaustubh
4 Replies

10. Shell Programming and Scripting

Help reading the array and sum of the array elements

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
Vend::Table::Editor(3pm)				User Contributed Perl Documentation				  Vend::Table::Editor(3pm)

NAME
Vend::Table::Editor -- Interchange do-all HTML table editor SYNOPSIS
[table-editor OPTIONS] [table-editor OPTIONS] TEMPLATE [/table-editor] DESCRIPTION
The [table-editor] tag produces an HTML form that edits a database table or collects values for a "wizard". It is extremely configurable as to display and characteristics of the widgets used to collect the input. The widget types are based on the Interchange "[display ...]" UserTag, which in turn is heavily based on the ITL core "[accessories ...]" tag. The "simplest" form of "[table-editor]" is: [table-editor table=foo] A page which contains only that tag will edit the table "foo", where "foo" is the name of an Interchange table to edit. If no "foo" table is "defined", then nothing will be displayed. If the "mv_metadata" entry "foo" is present, it is used as the definition for table display, including the fields to edit and labels for sections of the form. If "ui_data_fields" is defined, this cancels fetch of the view and any breaks and labels must be defined with "ui_break_before" and "ui_break_before_label". More on the view concept later. A simple "wizard" can be made with: [table-editor wizard=1 ui_wizard_fields="foo bar" mv_nextpage=wizard2 mv_prevpage=wizard_intro ] The purpose of a "wizard" is to collect values from the user and place them in the $Values array. A next page value (option mv_nextpage) must be defined to give a destination; if mv_prevpage is defined then a "Back" button is presented to allow paging backward in the wizard. perl v5.14.2 2011-03-09 Vend::Table::Editor(3pm)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy