Sponsored Content
Full Discussion: Storing values in arrays
Top Forums Shell Programming and Scripting Storing values in arrays Post 302468627 by kristinu on Wednesday 3rd of November 2010 11:15:38 AM
Old 11-03-2010
Some other guy wrote it and I am trying to use the program. There will be lot of stuff to change if I want to convert everything to bash or ksh.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Storing values in variable

Hi All, Here is the description of the problem. I am scripting for database access using k-shell on solaris box dbaccess <databasename> - << EOF 2>/dev/null | awk 'BEGIN {FS=" "}\ {printf "%s", $1}' | grep -v "^$" | \ read cnt1 OUTPUT TO PIPE cat WITHOUT HEADINGS select count(*) from... (1 Reply)
Discussion started by: matrixmadhan
1 Replies

2. Shell Programming and Scripting

Storing information in arrays....

Hello, I am writing a shell script to do the following. It greps information from the messages log and then I use the cut command to isolate the field I need (the username) and output the information to a text file. I now have to do the following. Count how many times each user logged in. So... (3 Replies)
Discussion started by: mojoman
3 Replies

3. Shell Programming and Scripting

Storing Command Line Values

Hi, I am trying to read the value passed by the user and store it in a variable so that later I can read it from the variable. But I am getting errors. Can you please help? Thanks. Code: $ECHO "Enter the Country for which you want the installation to be executed? (US/India):" read COUNTRY... (3 Replies)
Discussion started by: yoursdavinder
3 Replies

4. UNIX for Dummies Questions & Answers

Storing Multiple Values in a Variable

Hi, My code is as below: integer i=7 while ((i <= 5 )); do # test_out is a variable which contains data separated by "^". a= `echo $test_out | cut -d"^" -f$i` echo "$a" (( i = i + 1)); done From the above code, i kept $i after f so that i can capture all the data which is... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

5. Shell Programming and Scripting

storing values in a list or array

i have a file called file.txt having the following entries. 2321 2311 2313 4213 i wnat to store these values in a list and i want to iterate the list using loop and store it in another list (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

6. Shell Programming and Scripting

fetching values using awk and storing into array

hi all I am using awk utility to parse the file and fetching two different vaues from two different record of a record set. I am able to see the result, now i want to store the result and perform some check of each values form database to mark valid and invalid. could you please help me... (3 Replies)
Discussion started by: singhald
3 Replies

7. Shell Programming and Scripting

storing values in arrays using shell

Friends, I have to execute a command and store its contents into an array using shell. this is what i have tried #!/bin/bash disk_names = ($(`iostat -xtc | egrep -v "device|nfs" | awk '{print $1}'| tr '\n' ' ' `)) But its throwing an error message as ./test-script ./test-script:... (6 Replies)
Discussion started by: achak01
6 Replies

8. Shell Programming and Scripting

Storing values in arrays using csh

I am reading a number of files but then I want to put the ranges xmin xmax ymin ymax as arrays for each file. Any idea how I can do this??? set j = 1 echo "Welcome $i times" while ( $j <= $i ) echo "$j" set fname = $fin-bst-misf.xy echo " "$fname ... (0 Replies)
Discussion started by: kristinu
0 Replies

9. UNIX for Dummies Questions & Answers

Storing values in shell variable

Hi, I am writing a shell script where, x=y y=z When I want to print z, I can do $y How do I use only "x" without any direct reference to "y" to print z? Thanks, -G (3 Replies)
Discussion started by: gaurab
3 Replies

10. Shell Programming and Scripting

storing multiple values in a array variable

Am using a find command in my script .The output may be one or more. I need to store those values in a array and need to access those. Am unable to find the solution . Any help on this will be helpful. if < code> else a=<find command output which gives the file name either 1 or more> if 1... (1 Reply)
Discussion started by: rogerben
1 Replies
LDAP_UFN(3)						     Library Functions Manual						       LDAP_UFN(3)

NAME
ldap_ufn_search_s, ldap_ufn_search_c, ldap_ufn_search_ct, ldap_ufn_setfilter, ldap_ufn_setfilter, ldap_ufn_setprefix, ldap_ufn_timeout - Perform an LDAP user friendly search operation SYNOPSIS
#include <ldap.h> int ldap_ufn_search_c(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm) LDAP *ld; char *ufn; char **attrs; int attrsonly; LDAPMessage **res; int (*cancelproc)(); void *cancelparm; int ldap_ufn_search_ct(ld, ufn, attrs, attrsonly, res, cancelproc, cancelparm, tag1, tag2, tag3) LDAP *ld; char *ufn; char **attrs; int attrsonly; LDAPMessage **res; int (*cancelproc)(); void *cancelparm; char *tag1, *tag2, *tag3; int ldap_ufn_search_s(ld, ufn, attrs, attrsonly, res) LDAP *ld; char *ufn; char **attrs; int attrsonly; LDAPMessage **res; LDAPFiltDesc *ldap_ufn_setfilter(ld, fname) LDAP *ld; char *fname; void ldap_ufn_setprefix(ld, prefix) LDAP *ld; char *prefix; int ldap_ufn_timeout(tvparam) void *tvparam; DESCRIPTION
These routines are used to perform LDAP user friendly search operations. ldap_ufn_search_s() is the simplest form. It does the search synchronously. It takes ld to identify the the LDAP connection. The ufn parameter is the user friendly name for which to search. The attrs, attrsonly and res parameters are the same as for ldap_search(3). The ldap_ufn_search_c() routine functions the same as ldap_ufn_search_s(), except that it takes cancelproc, a function to call periodicly during the search. It should be a function taking a single void * argument, given by calcelparm. If cancelproc returns a non-zero result, the search will be abandoned and no results returned. The purpose of this routine is to provide a way for the search to be cancelled, for example, by a user or because some other condition occurs. The ldap_ufn_search_ct() routine is like ldap_ufn_search_c(), except that it takes three extra parameters. tag1 is passed to the ldap_init_getfilter(3) routine when resolving the first component of the UFN. tag2 is used when resolving intermediate components. tag3 is used when resolving the last component. By default, the tags used by the other UFN search routines during these three phases of the search are "ufn first", "ufn intermediate", and "ufn last". The ldap_ufn_setfilter() routine is used to set the ldapfilter.conf(5) file for use with the ldap_init_getfilter(3) routine to fname. The ldap_ufn_setprefix() routine is used to set the default prefix (actually, it's a suffix) appended to UFNs before searhing. UFNs with fewer than three components have the prefix appended first, before searching. If that fails, the UFN is tried with progressively shorter versions of the prefix, stripping off components. If the UFN has three or more components, it is tried by itself first. If that fails, a similar process is applied with the prefix appended. The ldap_ufn_timeout() routine is used to set the timeout associated with ldap_ufn_search_s() searches. The timeout parameter should actu- ally be a pointer to a struct timeval (this is so ldap_ufn_timeout() can be used as a cancelproc in the above routines). NOTES
These routines may dynamically allocate memory. The caller is required to free such memory using the supplied deallocation routines. Return values are contained in <ldap.h>. SEE ALSO
gettimeofday(2), ldap(3), ldap_search(3), ldap_getfilter(3), ldapfilter.conf(5), ldap_error(3) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.0.27-Release 22 September 1998 LDAP_UFN(3)
All times are GMT -4. The time now is 04:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy