hi guys,
i have an array called ARRAY which has elements in it... i am trying to assign elements of ARRAY to master_array..
i get a =: command not found error..
i=0
while
do
${master_array}=${ARRAY}
((i++))
done
is there something i am missing? (4 Replies)
Hi!
Could someone explain me why the below code is printing the contents of IF block 5 times instead of 0?
#!/bin/bash
VAR1="something"
VAR2="something"
for((i=0;i<10;i++))
do
if(($VAR1=~$VAR2))
then
echo VAR1: $VAR1
echo... (3 Replies)
Hey guys,
I'm kinda a noob at scripting. I am trying to create a script that uses multiple for loops with the lsiutility to monitor disk health on a system.
The script runs, but it will continually echo an infinite number of LogVolumes when there are only 2 per virtual disk on my server. It's... (2 Replies)
Hello All,
i have a really strange copy paste problem. When I write some loops in an editor for example:
for j in 1 2 3
do
echo "$j"
done
and I want to paste it to the shell, the result in the shell is:
for j in 1 2 3; do e;
other commands work fine and if a copy paste... (4 Replies)
Hi All,
I've been researching this problem and I am pretty sure that the issue is related to the while loop and the piping. There are plenty of other threads about this issue that recommend removing the pipe and using redirection. However, I haven't been able to get it working using the ssh and... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Your shell script should continue to execute until the user selects option 4
2. Relevant commands, code,... (2 Replies)
Hi,
This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables.
Something... (5 Replies)
hello
i'm writing a script and I want to use a for loop inside a while loop as following:
while read line;
do
echo $line
for i in $vrm;
do
echo $i
done
done < './contacts'
when i use just the while loop it prints the lines from file ./contacts just... (13 Replies)
What is the proper way to run two bash loops in the same command? The two below loops run separately, the problem is when I pipe them I get an error that the file used for the second loop does not exist. I am not sure how to wait for the first loop to complete and then start the second. Thank... (10 Replies)
Hello,
Below I try to control that the input is good an IP :
#!/bin/bash
cp /home/scripts/choice_interfaces.txt /home/scripts/interfaces.txt
chmod 644 /home/scripts/interfaces.txt
echo -e "Please enter the network informations into the /etc/network/interfaces file, complete them below... (9 Replies)
Discussion started by: Arnaudh78
9 Replies
LEARN ABOUT DEBIAN
dr::tarantool::spaces
DR::Tarantool::Spaces(3pm) User Contributed Perl Documentation DR::Tarantool::Spaces(3pm)NAME
DR::Tarantool::Spaces - spaces container
SYNOPSIS
use DR::Tarantool::Spaces;
my $s = new DR::Tarantool::Spaces({
1 => {
name => 'users', # space name
default_type => 'STR', # undescribed fields
fields => [
qw(login password role),
{
name => 'counter',
type => 'NUM'
},
{
name => 'something',
type => 'UTF8STR',
},
{
name => 'opts',
type => 'JSON',
}
],
indexes => {
0 => 'login',
1 => [ qw(login password) ],
2 => {
name => 'my_idx',
fields => 'login',
},
3 => {
name => 'my_idx2',
fields => [ 'counter', 'something' ]
}
}
},
0 => {
...
}
});
my $f = $s->pack_field('users', 'counter', 10);
my $f = $s->pack_field('users', 1, 10); # the same
my $f = $s->pack_field(1, 1, 10); # the same
my $ts = $s->pack_keys([1,2,3] => 'my_idx');
my $t = $s->pack_primary_key([1,2,3]);
DESCRIPTION
The package describes all spaces that You use. It supports the following field types:
NUM, NUM64, STR
- standard tarantool <http://tarantool.org> types.
UTF8STR
- the same as STR, but string will be utf8-decoded after extracting from database.
INT & INT64
- the same as NUM and NUM64, but contain signed values.
JSON
- the filed will be encoded by JSON::XS before inserting and decoded after extracting from database.
METHODS
new
my $spaces = DR::Tarantool::Spaces->new( $spaces );
space
Returns space object by number or name.
my $space = $spaces->space('name');
my $space = $spaces->space(0);
pack_field
packs one field before making database request
my $field = $spaces->pack_field('space', 'field', $data);
unpack_field
unpacks one field after extracting data from database
my $field = $spaces->unpack_field('space', 'field', $data);
pack_tuple
packs tuple before making database request
my $t = $spaces->pack_tuple('space', [ 1, 2, 3 ]);
unpack_tuple
unpacks tuple after extracting data from database
my $t = $spaces->unpack_tuple('space', @fields);
SPACES methods
new
constructor
use DR::Tarantool::Spaces;
my $space = DR::Tarantool::Space->new($no, $space);
name
returns space name
number
returns space number
pack_field
packs field before making database request
unpack_field
unpacks field after extracting data from database
pack_tuple
packs tuple before making database request
unpack_tuple
unpacks tuple after extracting data from database
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::Spaces(3pm)