I have a following program:
echofunc()
{
filename=$1
echo "reading $filename"
while read line
do
echo $line;
sleep 6;
done < $filename
}
split -5 new.dat
ls x* > input.dat
while read file
do
echofun $file &
done < input.dat (3 Replies)
I am trying to write a script that will ssh into a remote machine and recurse through a specified directory, find mp3 files which may be two or three directories deep (think iTunes: music/artist/album/song.mp3), and scp them back to the machine running the script. The script should also maintain... (3 Replies)
hello there,
there's a function, in my shell script, i'd like to run in the background.
here's an example:
log()
{
local SELF=${0##*/}
tty -s && echo ": $*"
}
some_func()
{
# do something
log "This text is not displayed in the terminal's output when running in the... (1 Reply)
Dear All,
I am trying to run a script in background like ./scriptname.sh & but when i try to run it in background it is giving me an error "syntax error at line 12: `(' unexpected" at the line 12, there is a function definition
"function getFileList()".
This script runs fine if i run on... (2 Replies)
I have written the below query to genrate a telephone.I am passing account number from oracle database.
I am calling 2 scripts which generate the bill
1. bip.sh (it runs in the background)
2.runXitInvoice_PROFORMA_integ
bip.sh generates a number which runXitInvoice_PROFORMA_integ
uses.How... (7 Replies)
Hi Guys,
i am having a script which checks for ip address is pingable or not,when i execute this script in terminal it keeps on showing the pinging status of every ip address and it takes more time when i check for 100 ip address,How to do run a script in background without showing in the terminal... (4 Replies)
Hello,
I have a requirement to apply hashing algorithm on flat file on one or more columns dynamically based on header
sample input file
ID|NAME|AGE|GENDER
10|ABC|30|M
20|DEF|20|F
say if i want multiple columns based on the header example id,name or id,age or name,gender and hash and... (13 Replies)
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
LEARN ABOUT DEBIAN
gearman_worker_st
GEARMAN_WORKER_ST(3) Gearmand GEARMAN_WORKER_ST(3)NAME
gearman_worker_st - Gearmand Documentation, http://gearman.info/
SYNOPSIS
#include <libgearman/gearman.h>
gearman_worker_st
gearman_worker_set_task_context_free_fn
int gearman_worker_timeout(gearman_worker_st *worker)
void gearman_worker_set_timeout(gearman_worker_st *worker, int timeout)
void *gearman_worker_context(const gearman_worker_st *worker)
void gearman_worker_set_context(gearman_worker_st *worker, void *context)
void gearman_worker_set_workload_malloc_fn(gearman_worker_st *worker, gearman_malloc_fn *function, void *context)
void gearman_worker_set_workload_free_fn(gearman_worker_st *worker, gearman_free_fn *function, void *context)
gearman_return_t gearman_worker_wait(gearman_worker_st *worker)
gearman_return_t gearman_worker_register(gearman_worker_st *worker, const char *function_name, uint32_t timeout)
gearman_return_t gearman_worker_unregister(gearman_worker_st *worker, const char *function_name)
gearman_return_t gearman_worker_unregister_all(gearman_worker_st *worker)
gearman_job_st *gearman_worker_grab_job(gearman_worker_st *worker, gearman_job_st *job, gearman_return_t *ret_ptr)
void gearman_job_free_all(gearman_worker_st *worker)
bool gearman_worker_function_exist(gearman_worker_st *worker, const char *function_name, size_t function_length)
gearman_return_t gearman_worker_work(gearman_worker_st *worker)
Link with -lgearman
DESCRIPTION
gearman_worker_st is used for worker communication with the server.
gearman_worker_context() and gearman_worker_set_context() can be used to store an arbitrary object for the user.
gearman_worker_set_task_context_free_fn() sets a trigger that will be called when a gearman_task_st is released.
gearman_worker_timeout() and gearman_worker_set_timeout() get and set the current timeout value, in milliseconds, for the worker.
gearman_worker_function_exist() is used to determine if a given worker has a specific function.
Normally malloc(3) and free(3) are used for allocation and releasing workloads. gearman_worker_set_workload_malloc_fn() and
gearman_worker_set_workload_free_fn() can be used to replace these with custom functions.
If you need to remove a function from the server you can call either gearman_worker_unregister_all() to remove all functions that the
worker has told the gearmand server about, or you can use gearman_worker_unregister() to remove just a single function.
RETURN
Various
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_WORKER_ST(3)