09-19-2011
10 More Discussions You Might Find Interesting
1. Programming
Hi,
This is the first time, i am doing UNIX & C stuff.
I have written one funtion like
#include <stdio.h>
seq(num)
int num;
{
int i,sum;
for (i=1; i<=num;i++)
sum+=i;
return(sum);
}
this seq funtion should have return values to unix script.
like
.. (4 Replies)
Discussion started by: sundarm
4 Replies
2. Shell Programming and Scripting
hi all
im working in tcsh shell.
In sh shell i write for example:
case in $www
1 | 2 | 3)
arguments;;
4 | 5 | 6)
arguments;;
esac
can anybody tell me the equivalent to tcsh of
1 | 2 | 3)? (2 Replies)
Discussion started by: micromicrin
2 Replies
3. UNIX for Dummies Questions & Answers
hi Gurus,
I'm a newbie in scripting please check my script if this is correct. I think there's something wrong with it but I;m not sure. I'm trying to create multiple lines using awk from external xml files but i want to add additonal info in the data manually
Since i don't knwo how to... (0 Replies)
Discussion started by: sexyTrojan
0 Replies
4. Shell Programming and Scripting
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Discussion started by: Straitsfan
25 Replies
5. Shell Programming and Scripting
Hi experts,
I am totally stuck with this.
I run a looping "for" command for multiple directories, manually, I have done this :
vfor dir in A B; do
cp -p $dir/X.txt X-${dir}.txt
done
where A and B is directory name.
However, I need to run for many directories.
So I have tried this :... (7 Replies)
Discussion started by: guns
7 Replies
6. Shell Programming and Scripting
Hi all,
I am attempting to create a shell script to optimize some routine process.
I want this script can let user select the actions they want to do.
But I met a problem that my script can only read one input and then do one action.
Is it possible to let my script to run more than one... (2 Replies)
Discussion started by: kaiya
2 Replies
7. Shell Programming and Scripting
complinagetest () #function name
{
if ;then
rm complins.dat
fi
touch complins.dat
i=0
while read line
do
if ; then
va=`grep -w "$line" datalins1.dat | awk BEGIN'{FS="\`~"}{if ( $3=="'$line'" ) {print $4}}'`
i=$(($i+1))
varits=$(echo $va|awk -v varif="$i" '{print... (1 Reply)
Discussion started by: amitpaul01
1 Replies
8. Shell Programming and Scripting
14`~abc`~9`~11
14`~abc`~9`~10
36`~ee`~7`~9
36`~ee`~8`~9
58`~rtt`~12`~7
70`~gff`~13`~8
86`~tyu`~6`~12
86`~tyu`~6`~13
92`~mjh`~5`~6
28`~jkl`~10`~DNA
32`~mjk`~SNA`~5
82`~jkli`~11`~DNA
------------------------------------
Field Seperator: `~
The concept is to start with SNA in the 3rd... (8 Replies)
Discussion started by: barath
8 Replies
9. Shell Programming and Scripting
Hello friends,
I want to run this code on every document in every sub-directory.
tr -d '\n' < MulitpleInput.txt | awk '{gsub(/\. /,".\n");print}' | grep “\
I tried several looping techniques but couldn't get it to run in this example. Any ideas?
Thank you (2 Replies)
Discussion started by: danbroz
2 Replies
10. Programming
Not sure if this is possible, but I've tried this about a thousand ways now. I am making something with a lot of arrays. I thought I could put the array names into a separate array and then loop through them to call all of their elements. This is the best I've got so far:
#include <stdio.h>... (4 Replies)
Discussion started by: Azrael
4 Replies
LEARN ABOUT DEBIAN
dr::tarantool::syncclient
DR::Tarantool::SyncClient(3pm) User Contributed Perl Documentation DR::Tarantool::SyncClient(3pm)
NAME
DR::Tarantool::SyncClient - sync driver for tarantool <http://tarantool.org>
SYNOPSIS
my $client = DR::Tarantool::SyncClient->connect(
port => $tnt->primary_port,
spaces => $spaces
);
if ($client->ping) { .. };
my $t = $client->insert(
first_space => [ 1, 'val', 2, 'test' ], TNT_FLAG_RETURN
);
$t = $client->call_lua('luafunc' => [ 0, 0, 1 ], 'space_name');
$t = $client->select(space_name => $key);
$t = $client->update(space_name => 2 => [ name => set => 'new' ]);
$client->delete(space_name => $key);
METHODS
connect
Connects to tarantool.
Arguments
The same as "connect" in DR::Tarantool::AsyncClient exclude callback.
Returns a connector or croaks error.
ping
The same as "ping" in DR::Tarantool::AsyncClient exclude callback.
Returns TRUE or FALSE if an error.
insert
The same as "insert" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened.
select
The same as "select" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened.
update
The same as "update" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened.
delete
The same as "delete" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened.
call_lua
The same as "call_lua" in DR::Tarantool::AsyncClient exclude callback.
Returns tuples that were extracted from database or undef. Croaks error if an error was happened.
COPYRIGHT AND LICENSE
Copyright (C) 2011 Dmitry E. Oboukhov <unera@debian.org>
Copyright (C) 2011 Roman V. Nikolaev <rshadow@rambler.ru>
This program is free software, you can redistribute it and/or
modify it under the terms of the Artistic License.
VCS
The project is placed git repo on github: https://github.com/unera/dr-tarantool/ <https://github.com/unera/dr-tarantool/>.
perl v5.14.2 2012-06-04 DR::Tarantool::SyncClient(3pm)