If you really want the id of the newest match, take RudiCs snippet. If you just assume that the first match is the newest, you can go simpler by using that:
If someone wants to use a parser for more robust operation, one can use this as a starting point:
Note: I assume only gnu awk supports match(subject,pattern,array) Other variants of awk only support 2 parameter match like match(subject,pattern), which will cause a syntax error here.
Hi,
I have a requriement where in I need to install a s/w by executing the installable file through a script. The script currently contains the path of the installable file. I need to now update the script accordingly such tht it identifies the location of the installable file automatically and... (1 Reply)
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)
I have a bash challenge. I have several virtualization hosts for which I need to collect VM information. I need to dynamically create an array for each host. The contents of the array should be the list VMs running on the host. Here's the logic; I just need someone to help me with the details:... (0 Replies)
I have a pointer to a structure containing an integer pointer:
struct members {
int id;
int *neigh;
};
The number of members N and its neighbors M change as the code runs, so I allocate the memory dynamically:
members *grid = malloc(sizeof(members)*N);
for(i=0;i<N;i++)... (2 Replies)
Hi,
Is it possible to choose the inerpreter conditionally.
For example, if whereis bash returns /usr/bin/bash then i need to choose #!/usr/bin/bash
else i need to use #!/usr/bin/sh.
Is it possible to achieve in a shell script?
Thanks (1 Reply)
Dear Friends,
I have file a.txt
1|2|3|4|5|6|7|8
a|b|c|d|e|f|g|h
i am using the below code to swap the fields in file
awk -F\| '{print $5,$1,$2,$3,$4,$6,$7,$8}' OFS=\| a.txt > output.txt
output.txt
5|1|2|3|4|6|7|8
e|a|b|c|d|f|g|h
The above command is working fine. I am... (4 Replies)
Hi all,
Does anyone know if it possible to append a parameter to a function name?
Something like the following:
function tnsrec_${SERVICE_NAME} {
code..
}
Any ideas? (6 Replies)
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
LEARN ABOUT DEBIAN
authlib
AUTHLIB(3) Double Precision, Inc. AUTHLIB(3)NAME
authlib - Courier Authentication Library
SYNOPSIS
courierauthconfig [[--ldflags] | [--cppflags]]
DESCRIPTION
The Courier authentication library consists of two libraries:
-lcourierauth
Authentication functions.
-lcourierauthsasl
SASL authentication functions.
courierauthconfig --cppflags produces on standard output any necessary compiler flags that are needed to access the courierauth.h and the
courierauthsasl.h header files. courierauthconfig --ldflags produces on standard output any necessary compiler flags that are needed to
link against the courierauth or courierauthsasl libraries.
SEE ALSO auth_generic(3)[1], auth_login(3)[2], auth_getuserinfo(3)[3], auth_enumerate(3)[4], auth_passwd(3)[5], auth_sasl(3)[6].
NOTES
1. auth_generic(3)
auth_generic.html
2. auth_login(3)
auth_login.html
3. auth_getuserinfo(3)
auth_getuserinfo.html
4. auth_enumerate(3)
auth_enumerate.html
5. auth_passwd(3)
auth_passwd.html
6. auth_sasl(3)
auth_sasl.html
Double Precision, Inc. 08/23/2008 AUTHLIB(3)