08-07-2008
Quote:
Originally Posted by
subin_bala
Its working fast for me.. thnks...
But i am not getting the values of these arrays outside the awk ...
[...]
That's why I was asking what is the next task: you can get the values outside,
but I'm sure you can continue with the next task using Awk. Could you describe the next task?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
set -A arr a1 a2 a3 a4
# START
ssh -xq $Server1 -l $Username /usr/bin/ksh <<-EOS
integer j=0
for loop in ${arr}
do
printf "array - ${arr}\n"
(( j = j + 1 ))
j=`expr j+1`
done
EOS
# END
=========
this is not giving me correct output.
I... (5 Replies)
Discussion started by: reldb
5 Replies
2. UNIX for Advanced & Expert Users
hi All,
I have a array as follows,
array1=("xx" "abc" "def" "xyz")
and each array1 is also storing some array values, like
array1=abc
and abc=("a" "b" "c") etcetera etcetra.........
Note : each subarray under array1 have index 3 i.e. it can max contain 3 values
if i echo ${abc} ... (5 Replies)
Discussion started by: manas_ranjan
5 Replies
3. Shell Programming and Scripting
I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be??
e.g. running time strings through an array and trying to examine just minutes:
12:25:30
10:15:13
08:55:23
awk '
NR==FNR{
... (2 Replies)
Discussion started by: dcfargo
2 Replies
4. Shell Programming and Scripting
i just want to dump my array and see if it contains the values i am expecting. It should print as follows,
ignore=345fht
ignore=rthfg56
.
.
.
ignore=49568g
Here is the code. Is this even possible to do? please help
termReport.pl < $4 | dos2ux | head -2000 | awk '
BEGIN... (0 Replies)
Discussion started by: usustarr
0 Replies
5. Shell Programming and Scripting
Hello I have the file df.tmp
FS is actually the / FS but escape character\ and end of line $ is used in order to fetch exctly / and not other filesystems.
awk '/\/$/ {print $(NF-1)+0}' df.tmp will work properly and return a value eg. 60
but when I am trying to issue the command with the array... (3 Replies)
Discussion started by: drbiloukos
3 Replies
6. Shell Programming and Scripting
I have a file
root@server # cat /root/list12
11.22.33.44
22.33.44.55
33.44.55.66
33.44.55.66
33.44.55.66
I try to pass to array and display unique.
root@server# cat /root/test12.sh
#!/bin/bash
#delcare array badips and accumulate values to array elemenrs
badips=( $( cat... (4 Replies)
Discussion started by: anil510
4 Replies
7. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
8. Shell Programming and Scripting
I tried to use variable inside an array variable, but its not working as expected.:wall:
ENV1=123
ENV1=789
ENV1=120
ENV2=567
if
then
name=ENV1
echo "${name}"
echo "${name}"
echo "${name}"
else
name=ENV1
echo "${name}"
fi
Output: ./val.sh 1
123 (2 Replies)
Discussion started by: Jayavinoth
2 Replies
9. UNIX for Dummies Questions & Answers
Hi guys
Let me at first describe the whole thing that I'm trying to do. Lets say I have 100 files like the following one.
Ow 1230 16.000000 -0.834000 16.083957
1.751652398 -17.20094528 -4.450623277
Hw 1231 ... (6 Replies)
Discussion started by: saleheen
6 Replies
10. UNIX for Beginners Questions & Answers
The requirement is i need to find an array value matching with pattern {5:{ , replace that with 5: and reassign that to same array index and print it.
I write something like below and the issue is sed command is not working. If i replace " with "`" the script gives syntax error.how can i... (8 Replies)
Discussion started by: bhagya123
8 Replies
LEARN ABOUT DEBIAN
gearman_task_take_data
GEARMAN_TASK_TAKE_DATA(3) Gearmand GEARMAN_TASK_TAKE_DATA(3)
NAME
gearman_task_take_data - Gearmand Documentation, http://gearman.info/
SYNOPSIS
#include <libgearman/gearman.h>
gearman_task_st
void gearman_task_free(gearman_task_st *task)
void *gearman_task_context(const gearman_task_st *task)
void gearman_task_set_context(gearman_task_st *task, void *context)
const char *gearman_task_function_name(const gearman_task_st *task)
const char *gearman_task_unique(const gearman_task_st *task)
const char *gearman_task_job_handle(const gearman_task_st *task)
bool gearman_task_is_known(const gearman_task_st *task)
bool gearman_task_is_running(const gearman_task_st *task)
uint32_t gearman_task_numerator(const gearman_task_st *task)
uint32_t gearman_task_denominator(const gearman_task_st *task)
void gearman_task_give_workload(gearman_task_st *task, const void *workload, size_t workload_size)
size_t gearman_task_send_workload(gearman_task_st *task, const void *workload, size_t workload_size, gearman_return_t *ret_ptr)
const void *gearman_task_data(const gearman_task_st *task)
size_t gearman_task_data_size(const gearman_task_st *task)
void *gearman_task_take_data(gearman_task_st *task, size_t *data_size)
size_t gearman_task_recv_data(gearman_task_st *task, void *data, size_t data_size, gearman_return_t *ret_ptr)
const char *gearman_task_error(const gearman_task_st *task)
New in version 0.21.
gearman_return_t gearman_task_return(const gearman_task_st *task)
New in version 0.21.
Link with -lgearman
DESCRIPTION
A gearman_task_st represents a task. Work that is sent by a client to a gearman server is seen as a task (a worker recieves a task in the
form of a job.
Tasks, i.e. gearman_task_st are created by calling either gearman_execute(), gearman_client_add_task(), or gearman_client_add_task_back-
ground().
gearman_client_add_task_status() can also create gearman_task_st, these tasks will be used to monitor a previously created gearman_task_st.
gearman_task_free() is used to free a task. This only needs to be done if a task was created with a preallocated structure or if you want
to clean up the memory of a specific task.
gearman_task_set_context() sets the given context of the gearman_task_st. The context can be used to pass information to a gearman_task_st.
gearman_task_context() returns the context that was used in the creation of the gearman_task_st (or that was set with
gearman_task_set_context().
gearman_task_data() returns the current data that has been returned to the task. gearman_task_data_size() will give you the size of the
value. gearman_task_take_data() is the same as gearman_task_data() but the value that is returned must be freed by the client (free(3)).
gearman_task_recv_data() can be used with pre-allocated buffers.
gearman_task_is_known(), gearman_task_is_running(), gearman_task_numerator(), and gearman_task_denominator(), return values related to the
last status update that was made to the gearman_task_st. They do not cause the gearman_task_st to update itself.
gearman_task_error() return the last error message that the gearman_task_st encountered. gearman_task_return() return the last gear-
man_return_t stored. A value of GEARMAN_UNKNOWN_STATE means that the task has not been submitted to server yet, or that no function was
available if the job has been submitted.
RETURN VALUE
Various. Values that are returned by gearman_task_take_data() must have free(3) called on them.
HOME
To find out more information please check: http://gearman.info/
SEE ALSO
gearmand(8) libgearman(3)
AUTHOR
Data Differential http://www.datadifferential.com/
COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/
0.33 May 04, 2012 GEARMAN_TASK_TAKE_DATA(3)