Sponsored Content
Full Discussion: dynamically setting an array
Top Forums Shell Programming and Scripting dynamically setting an array Post 302111532 by ragha81 on Wednesday 21st of March 2007 02:03:57 PM
Old 03-21-2007
dynamically setting an array

Hi Gurus,

How do I dynamically set up an array. Below is my code

Code:
if [[ $tsk_count -gt 0 ]]
  then

  set ecomm_task_limit = '${ecomm_srvr[$j]}'
fi

Here, I want to set values in the array "${ecomm_srvr[$j]}" into ecomm_task_limit upon each iteration. Finally I want to display all the values in the new array "ecomm_task_limit" after all the iterations are complete.

Thanks in advance
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting values in an array? Easy one

I need to do something like this: KEYS= for key in $KEYS do echo $key done The KEYS are static values in my script, I'm just having trouble with setting them as separate values. Thanks! (3 Replies)
Discussion started by: TheCrunge
3 Replies

2. UNIX for Dummies Questions & Answers

How can i read array elements dynamically in bash?

Hi friends how can we read array elements dynamically in bash shell? (1 Reply)
Discussion started by: haisubbu
1 Replies

3. Shell Programming and Scripting

KSH Setting multiples variables with an array

ih all, info=$(get_Info $daemon) # $info give : # "ev20 8800 TTIOGC 12345 astos EDITEUR 0 0 . ." server=$(echo $info | cut -d" " -f1) port=$(echo $info | cut -d" " -f2) dname=$(echo $info | cut -d" " -f3) dport=$(echo... (1 Reply)
Discussion started by: wolfhurt
1 Replies

4. Shell Programming and Scripting

Setting array equal to command response

normally when i type: condor_q | tail -1 command line returns: 0 jobs; 0 idle, 0 running, 0 held I want use the number in front of 'running' in a series of equality tests to submit more jobs when my queue gets low. Someone showed me how to do it a few days ago by setting an array equal to... (4 Replies)
Discussion started by: pattywac
4 Replies

5. Shell Programming and Scripting

set array name dynamically

Hi, I am trying to name a set of arrays dynamically named as @array_$i (The $i will mean that I obtain a set of arrays called: @array_1 @array_2 @array_3 etc. i tried various methods like @array_$i @{array_$i} etc. any ways to do this Thanks (4 Replies)
Discussion started by: esham
4 Replies

6. HP-UX

max limit in in setting array

hi, iam getting error when i assign a variable to an array of more that 315 character in length set -A array <variable> <variable> value is 000001 000002 and up to 000045 it is giving error as "The specified subscript cannot be greater than 1024." can any one help me to solve this (2 Replies)
Discussion started by: gomathi
2 Replies

7. Shell Programming and Scripting

How to create dynamically associative array in PHP?

Hi, I have an html page like this: <html> <body> <form action="test.php" method = "post"> Enter your name:<input name="search" type = "text" size ="40"> <br> Enter your age:<input name="age" type = "text" size ="20"> <input type = "submit" name="submit" value="search"> <input type =... (1 Reply)
Discussion started by: vanitham
1 Replies

8. Shell Programming and Scripting

Dynamically setting of environment variable... Can it be done?

Hi all, I am fairly new to unix scripting and will like to know how to dynamically set the name of an environment variable to be used. We have a .env file where we defined the names and locations of data files, trigger files, directories .... etc Example of variables defined in .env... (4 Replies)
Discussion started by: Morelia
4 Replies

9. UNIX for Dummies Questions & Answers

Setting file permissions dynamically

I'm working in a linux server where wrappers are executed by multiple users of different groups. The log and output files are created with 554 permissions by default. This is stopping other users to run the wrappers unless the log and output files are deleted or given 777 permission. Setting SUID... (1 Reply)
Discussion started by: praveenpa
1 Replies
sstein.f(3)							      LAPACK							       sstein.f(3)

NAME
sstein.f - SYNOPSIS
Functions/Subroutines subroutine sstein (N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK, IWORK, IFAIL, INFO) SSTEIN Function/Subroutine Documentation subroutine sstein (integerN, real, dimension( * )D, real, dimension( * )E, integerM, real, dimension( * )W, integer, dimension( * )IBLOCK, integer, dimension( * )ISPLIT, real, dimension( ldz, * )Z, integerLDZ, real, dimension( * )WORK, integer, dimension( * )IWORK, integer, dimension( * )IFAIL, integerINFO) SSTEIN Purpose: SSTEIN computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. The maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). Parameters: N N is INTEGER The order of the matrix. N >= 0. D D is REAL array, dimension (N) The n diagonal elements of the tridiagonal matrix T. E E is REAL array, dimension (N-1) The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to N-1. M M is INTEGER The number of eigenvectors to be found. 0 <= M <= N. W W is REAL array, dimension (N) The first M elements of W contain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. ( The output array W from SSTEBZ with ORDER = 'B' is expected here. ) IBLOCK IBLOCK is INTEGER array, dimension (N) The submatrix indices associated with the corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. ( The output array IBLOCK from SSTEBZ is expected here. ) ISPLIT ISPLIT is INTEGER array, dimension (N) The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. ( The output array ISPLIT from SSTEBZ is expected here. ) Z Z is REAL array, dimension (LDZ, M) The computed eigenvectors. The eigenvector associated with the eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. LDZ LDZ is INTEGER The leading dimension of the array Z. LDZ >= max(1,N). WORK WORK is REAL array, dimension (5*N) IWORK IWORK is INTEGER array, dimension (N) IFAIL IFAIL is INTEGER array, dimension (M) On normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. INFO INFO is INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL. Internal Parameters: MAXITS INTEGER, default = 5 The maximum number of iterations performed. EXTRA INTEGER, default = 2 The number of iterations performed after norm growth criterion is satisfied, should be at least 1. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 174 of file sstein.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 sstein.f(3)
All times are GMT -4. The time now is 03:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy