Hello Friends,
Is it possible to return an array from a user defined function in awk ?
example:
gawk '
BEGIN{}
{
catch_line = my_function(i)
print catch_line
print catch_line
print catch_line
}
function my_function(i)
{
print "echo"
line= "awk"
line= "gawk"... (2 Replies)
I have a file with the record of person:
cat > $TMP/record.txt
John Torres M Single 102353 Address
Mark Santos M Maried 103001 Address
Carla Maria F Maried 125653 Address
#!/bin/ksh
ManipulateID(){
...
return 0;
... #or
return 1;
}
cat $TMP/record.txt | awk 'BEGIN {printf... (4 Replies)
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Hello I have a very simple input file in which there are a list of numbers:
1
2
3
4
5
6
7
8
9
10
My actual dataset is about 200 lines long. I was wondering how to add different permutations of 3 numbers for all the numbers in the dataset. For example:
1+2+3; 3+5+7; 2+8+1; 9+3+4... (1 Reply)
Hi,
I need to filter my data based on items in column 23. Column 1 until column 23 are tab separated. This is how column 23 looks like:
PRIMARY=<0/1:504:499,5:.:.:.:0.01:1:15:.>
I want to extract lines if items 7 (separated by : ) in column 23 are more than 0.25 . In example above , item... (2 Replies)
hello,
I'm reading this thread, in which there is this code :awk '
function comb(v,i) {
for(i in A) {
delete A;
if(length(A))
comb((v?v"+":x)i)
else print v"+"i
A;
}
}
{ A }
END {
comb();
} ' infilebut I can't understand where does v come... (5 Replies)
Not sure where the problem is. I can run the script without any issue using the following command.
. /opt/app/scripts/cdc_migration.sh
But it fails with the below error when I try it this way
/opt/app/scripts/cdc_migration.sh
/opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT DEBIAN
giiseteventmask
giiSetEventMask(3) GGI giiSetEventMask(3)NAME
giiSetEventMask, giiGetEventMask, giiAddEventMask, giiRemoveEventMask - Set the types of events queued
SYNOPSIS
#include <ggi/gii.h>
int giiSetEventMask(gii_input_t inp, gii_event_mask evm);
gii_event_mask giiGetEventMask(gii_input_t inp);
int giiAddEventMask(gii_input_t inp, gii_event_mask evm);
int giiRemoveEventMask(gii_input_t inp, gii_event_mask evm);
DESCRIPTION
Calling giiSetEventMask indicates to LibGII that only the types of events that match the specified event mask will be read by the applica-
tion in subsequent giiEventPoll(3) or giiEventRead(3) calls. LibGII can then save time and memory by skipping checks and not allocating
queues for events that will never be read out. The default mask allows all events.
giiAddEventMask and giiRemoveEventMask are macros that set or delete individual bits in the bitmask.
Note: giiSetEventMask is an advisory call. For correct operation, the application still needs to pass a restrictive event mask to
the event reading functions.
RETURN VALUE
giiSetEventMask, giiAddEventMask and giiRemoveEventMask return 0 on success or an gii-error(3) code otherwise.
giiGetEventMask returns the currently set mask.
SEE ALSO gii_event_mask(3)libgii-1.0.x 2006-12-30 giiSetEventMask(3)