Hi,
Can anyone advise me on how to use array on Bash? I am really confuse in how eval is link to array... What i wan to do is let say i have an index of an array of 50. Store either 'N' or 'Y' or "NA" in each index. how to i go about doing it.. then lastly how to i print all the values out in... (2 Replies)
Hello,
I am trying to use the awk getline command to populate an array from a flat file.
Has anyone done this before?
So we have file1:
a
b
c
d
I want to create an array like index that contains these four elements (8 Replies)
I want to get a status code array for the commands in eval.
For example,
eval "ls abc; ls def; ls $HOME"
I want to get the status code for each ls command in eval. Is there any way to make it?
Thanks. (2 Replies)
I try to get a number of elements in an array, using dynamic array name.
I need the array name to be dynamic.
The array name is constructed as 'inf_ln_$nmb', where $nmb is a file line number
So, say I have the arr 'inf_ln_4':
> for (( el=0; el<${#inf_ln_4}; el++ )); do
> echo "$el:... (1 Reply)
I am trying to write a script that runs another script consecutively and records the PID of the called script each time it runs in an array.
I put in an echo statement to check the PID, when the script runs no PID is output, and the array seems to be empty. I assume it is problem with my code,... (3 Replies)
Hi all,
some small script with eval turned me to crazy.
my OS is linux
Linux s10-1310 2.6.16.53-0.8.PTF.434477.3.TDC.0-smp #1 SMP Fri Aug 31 06:07:27 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
below script works well
#!/bin/bash
eval ssh remotehost date
eval ssh remotehost ls
below... (1 Reply)
Hi Guys,
I've got a script that runs and collects statistics from one of our machines and outputs the data into a csv file. Now, that script runs fine and I managed to create another one (with a lot of help from this forum!!) to trim the csv file down to all the data that I need, rather than all... (9 Replies)
I have a question on how can I assign a output of a function to a variable which is executed in background.
Here is my example
$ cat sample_program.sh
#!/bin/ksh
exec_func () {
sleep 1
v=`expr $1 + 100`
print $v
}
export OUT_ARR
date
for i in 1 2
do
OUT_ARR=`exec_func $i` &... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
LEARN ABOUT OSF1
dxmsvngethighlighted
DXmSvnGetHighlighted(3X)DXmSvnGetHighlighted(3X)NAME
DXmSvnGetHighlighted - Retrieves (returns) a list of entries currently highlighted by the user.
SYNOPSIS
void DXmSvnGetHighlighted(
Widget widget,
int *entries(),
XtPointer *tags(),
int len );
PARAMETERS
The identifier (widget ID) of the SVN widget. A pointer to an array of integers to receive the highlighted entry numbers. A pointer to an
array of longwords to receive the application's entry_tag value for each highlighted entry. If tags are not required, a null pointer may
be passed. An integer that represents the number of entries allocated in the provided array.
DESCRIPTION
The DXmSvnGetHighlighted routine returns a list of entries that are currently highlighted by the user. Make this call in your application
between calls to DXmSvnDisableDisplay and DXmSvnEnableDisplay to ensure that the highlighted list is not changing.
The application is responsible for managing the memory used to return this list of highlighted entries. As such, note the following: At the
minimum, the number of entries in the array should be capable of holding the number of entries indicated by the value returned from the
DXmSvnGetNumHighlighted routine. If there are more entries in the array than the application will need, the SVN widget will set the value
for those extra entries to 0. If the capacity of the arrays passed is less than the number of selected entries, only the number of entries
allocated in the provided array (the value for len) will be returned.
DXmSvnGetHighlighted(3X)