Sorry, I missed the requirement to use text subscripts in the array. Which shell are you using? It might not allow textual subscripts for arrays in the first place; you might need to convert them to numbers, or come up with some other workaround. (Maybe name the variables with an underscore, like ConnectionFail_DB1, ConnectionFail_DB2)
:)
Suppose,I have one table A. Table A have one column. Table A have 10 rows. I want this 10 rows store into shell script variable.
like
#!/bin/ksh
v_shell_var=Hi
here in call oracle , through loop How can I store table A's 10 rows into v_shell_var (Shell Script Array).
Regards,
Div (4 Replies)
Hi,
I do have a file and the contents are as follws:
10
20
30
40
50
Now I want to store those values into an array. How can be done this ?? (3 Replies)
Dear all ,
I have a file whose content has the following format:
jboss.web:type=ThreadPool,name=AAAA
jboss.web:type=ThreadPool,name=BBBB
How can I parse this file to get the value of the name of each line (AAAA , BBBB) and store the result to an array ? (array = AAAA , array = BBBB).... (4 Replies)
Hi Guys,
I have a file which has numbers in it separated by newlines as follows:
1.113
1.456
0.556
0.021
-0.541
-0.444
I am using the following code to store these in an array in bash:
FILE14=data.txt
ARRAY14=(`awk '{print}' $FILE14`) (6 Replies)
Hi,
I would like to clarify about the NAWK array to store multiple lines from huge file.
The file is having an unique REF.NO, I wants to store the lines (it may be
100+ lines) till I found the new REF.NO.
How can I apply NAWK - arrays for the above?
Rgds,
sharif. (1 Reply)
Hi
I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file.
I am doing this in awk.
Here is my file1:
Blocks... (2 Replies)
Hi,
I'm trying to search a text file for a string: "energy(sigma->0)=". To do so, I executed the grep command, which returned many matches, for example:
energy without entropy = -112.16486170 energy(sigma->0) = -112.16520778
energy without entropy = -112.16488936 ... (5 Replies)
Dear All,
I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with:
#! /bin/bash
ch=`cut -f10 tmp.txt`
counter=0
for p in $pid
do
c=${ch}
echo "$c ..$counter"
counter=$((counter+1))... (2 Replies)
Hi,
I have a problem where i have to hit multiple URL that are stored in a text file (input.txt) and save their output in different text file (output.txt) somewhat like :
cat input.txt
http://192.168.21.20:8080/PPUPS/international?NUmber=917875446856... (3 Replies)