Basically what I want to do is take SURNAME and assign it to NAME as a variable for each element.
This is what I have come up with... ( adding/changing - [ typeset NAME[$i]="${SURNAME[$i]}" ])
As I mentioned in my original post I got it to work another way and couldn't replicate it again. I was just wondering if it was a fluke or another way of assigning an array I was not aware of.
A follow-up question to this is how I would approach combining the two arrays together into another single array?
example: display_name="NAME[$i] ${SURNAME[$i]}"
So that it would echo ${display_name[0]} and return "John Doe"
hi, I was wondering if there was a good way to create an array within a function, where the name is based on a passed argument? I tried this:
_____________________________
func(){
#take in 1st arg as the arrayname
arrayName=$1
let i=0
while read line
do
arrayName=${line}
let i+=1... (5 Replies)
I need to create arrays like this:
cnt=0
{ while read myline; do
if ];then
firstpass="${myline##<meas>}"
meas="${firstpass%%</meas>}"
tempmeas="${meas%%;*}"
MEAS$cnt=$tempmeas
print $cnt
print ${MEAS'$cnt'}
... (2 Replies)
hi all
i have a directory which contain file
20060101-66666-09-08-0.tif
20060101-77777-11-12-0.tif
20051231-54221-66-55.tif
20051231-54221-66-44.tif
as you can see the name of the two last files is shorter then the first ones
i want to take all the files with the shorter name and to add to... (7 Replies)
I really need help on this problem.
The story:
My VAR1 and VAR2 works fine and able to get the value. I want to do as "if VAR1 or VAR2 is bigger than max_loadavg then the code will run...then if VAR1 or VAR2 is lesser than min_loadavg then the other code will run...
The problem:
The... (8 Replies)
Hi,
I need help in creating a array in shell scirpt.
I have a file which has following details.
hostname devices
device1
device 2
de
abcdmhs10 1234
2343
2353
3343
3435
2343
bcdfmhs11 2343
2443
3434
8874
0343
3434 (5 Replies)
Hello,
I am trying to redirect files to a directory by using a config file. The config files is as such:
xxxxxx,ID,PathToDirectory
xxxxxx,ID2,PathToDirectory2
and so on...
I have a variable that should match one of these IDs. I want to load this config file into an awk array, and... (2 Replies)
I am fairly new to bash and am not sure how to resolve this:
I have a series of geographical long/lat points eg. 50/-30 listed on separate lines in a file called junk2. I have input these into an array and am then using that array in a for loop. Towards the end of the loop I create a file called... (4 Replies)
Hi,
I'm trying to get the number of files inside same kind of folders on each disks and assigning each values in to a variable named with same folder and disk name so that it'll be easy for me to identify each time.But somehow I'm not able to assign those values in that specific name variable... (1 Reply)
Hi all,
I have a script with the following gist:
declare -a index=(0 1 2 3 4);
declare -a animals=(dog cat horse penguin cow);
declare -a fruits=(orange apple grapes peach mango);
declare -a drinks=(juice milk coffee tea coke);
declare -a cities=(toronto paris london glasgow... (18 Replies)
Hello everyone,
First of all this is my first post and im fairly new to working with Unix and creating scripts etc. so there will probably be wrong phrases used.
Lets get to my questions.
I have multiple scripts that submit Slurms/Jobs to the cluster starting like this and doing certain... (3 Replies)
Discussion started by: idbemad
3 Replies
LEARN ABOUT OSX
glgenvertexarrays
GLGENVERTEXARRAYS(3G) OpenGL 3.3 GLGENVERTEXARRAYS(3G)NAME
glGenVertexArrays - generate vertex array object names
C SPECIFICATION
void glGenVertexArrays(GLsizei n, GLuint *arrays);
PARAMETERS
n
Specifies the number of vertex array object names to generate.
arrays
Specifies an array in which the generated vertex array object names are stored.
DESCRIPTION
glGenVertexArrays returns n vertex array object names in arrays. There is no guarantee that the names form a contiguous set of integers;
however, it is guaranteed that none of the returned names was in use immediately before the call to glGenVertexArrays.
Vertex array object names returned by a call to glGenVertexArrays are not returned by subsequent calls, unless they are first deleted with
glDeleteVertexArrays().
The names returned in arrays are marked as used, for the purposes of glGenVertexArrays only, but they acquire state and type only when they
are first bound.
ERRORS
GL_INVALID_VALUE is generated if n is negative.
SEE ALSO
glBindVertexArray(), glDeleteVertexArrays()
COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
OpenGL 3.3 03/08/2011 GLGENVERTEXARRAYS(3G)