10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 100 Scripts, each containing 10-15 SQL's in them.
Each Script run for 40 mins to 1 hour 30 mins.
In the event of Failure in any step, if i re-start the Script, it will start running from the beginning. Which is waste of time. So in order handle this, i made the script to run from the... (7 Replies)
Discussion started by: kiran1992
7 Replies
2. High Performance Computing
We have a server with 160 hyper-threaded cpu's threads and 2Tb of RAM. I need to implement command line job queue and parallel thread usage for multiple user environment kindly suggest necessary tools to be installed.
I have understanding that sun grid engine like applications are available for... (0 Replies)
Discussion started by: vaibhavvsk
0 Replies
3. Shell Programming and Scripting
Hi All,
I need script to perform below task.
1. I have a script in one server and need to copy this script to remote server
2. login in to remote server
3. run the script which i copied to this server.
#!/bin/bash
read a
scp /tmp/script.sh user@hostname:/tmp
ssh user@$a
./scirpt.sh
... (2 Replies)
Discussion started by: bapu1981
2 Replies
4. UNIX for Dummies Questions & Answers
Hello
I am very new to Unix scripting,
I am using informatica etl,which is schedule by tidal enterprise.
I have a scenario where assume that Tidal only knows how to run jobs at a given time and does not know how to retry.
So i want to know weather can i write a shell script such that... (1 Reply)
Discussion started by: bluestarmoon
1 Replies
5. UNIX for Dummies Questions & Answers
I have found a question from the exercises of my study mat. The question is
"Why are there a in-core copy and a disk-copy of i-node block and super block?"
If any one know the proper answer then please send me..... (1 Reply)
Discussion started by: dearanik
1 Replies
6. Red Hat
Ok. I screwed up. Using dd, I made a bit-for-bit copy of disk /dev/hda, which contains 3 partitions.
dd if=/dev/hda of=olddrive.iso bs=2048k
However, I neglected to make a copy of the partition table. I'd like to mount partition 3, /dev/hda3, which is an xfs filesystem, but obviously I don't... (2 Replies)
Discussion started by: dangral
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I was looking for a schedular(a simple script would do or a tool) that would invoke jobs on few conditions:
1. Every day
2. Every working day(Considering customized holiday list, from a file or table)
3. Weekly
4. being able to define variable dependency. like on every day run,... (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies
8. Shell Programming and Scripting
Hi All,
I need to convert the data from excel to database table in sybase. Please provide some sample script..
thanks,
Royal. (1 Reply)
Discussion started by: royal9482
1 Replies
9. UNIX for Dummies Questions & Answers
hi
i'm a bit stuck trying to find the correct syntax in order to run a cron job which just truncates all info from a single table in my database
i have a main database - db1
and i have a table in that database - userips
i wish to create a cron job that truncates or removes all the info... (9 Replies)
Discussion started by: wingchun22
9 Replies
10. Shell Programming and Scripting
Hi,
I have to create a sheduler to run the shell scripts one by one(dependency).
Suppose i have 10 scripts.
For all the 10 scripts i have a database table containing these scripts_names and status.
Executing the first script.if the first status script is only 'success' then go to next... (4 Replies)
Discussion started by: laknar
4 Replies
TABLE(1) User Contributed Perl Documentation TABLE(1)
NAME
APR::Table -- A Perl API for manipulating opaque string-content table
SYNOPSIS
use APR::Table;
$table = make($pool, $nelts);
$table_copy = $table->copy($pool);
$table->clear();
$table->set($key => $val);
$table->unset($key);
$table->add($key, $val);
$val = $table->get($key);
@val = $table->get($key);
$table->merge($key => $val);
overlap($table_a, $table_b, $flags);
$new_table = overlay($table_base, $table_overlay, $pool);
$table->do(sub {print "key $_[0], value $_[1]
"}, @valid_keys);
#Tied Interface
$value = $table->{$key};
$table->{$key} = $value;
$table->{$key} = $value;
exists $table->{$key};
foreach my $key (keys %{$table}) {
print "$key = $table->{$key}
";
}
DESCRIPTION
"APR::Table" allows its users to manipulate opaque string-content tables.
The table's structure is somewhat similar to the Perl's hash structure, but allows multiply values for the same key. An access to the
records stored in the table always requires a key.
The key-value pairs are stored in the order they are added.
The keys are case-insensitive.
However as of the current implementation if more than value for the same key is requested, the whole table is lineary searched, which is
very inefficient unless the table is very small.
"APR::Table" provides a TIE Interface.
See apr/include/apr_tables.h in ASF's apr project for low level details.
API
The variables used in the API definition have the following "types":
o APR::Table
"$table_*"
o APR::Pool
$pool
o scalars: unsigned integers only (SVIV) (as C expects them)
$nelts, $flags
o scalars: (numerical (SVIV/SVNV) and strings (SVPV))
$key, $val
Function arguments (if any) and return values are shown in the function's synopsis.
o make()
$table = make($pool, $nelts);
Make a new table.
param $pool: The pool to allocate the pool out of.
param $nelts: The number of elements in the initial table.
return: a new table.
warning: This table can only store text data
o copy()
$table_copy = $table->copy($pool);
Create a new table and copy another table into it
param $pool: The pool to allocate the new table out of
param $table: The table to copy
return: A copy of the table passed in
o clear()
$table->clear();
Delete all of the elements from a table.
param $table: A copy of the table passed in
o set();
$table->set($key => $val);
Add a key/value pair to a table, if another element already exists with the same key, this will over-write the old data.
param $table: The table to add the data to.
param $key: The key fo use.
param $val: The value to add.
o add()
$table->add($key, $val);
Add data to a table, regardless of whether there is another element with the same key.
param $table: The table to add to
param $key: The key to use
param $val: The value to add.
o do()
$table->do(sub {[...]}, [@filter]);
Iterate over all the elements of the table, invoking provided subroutine for each element. The subroutine gets passed as argument, a
key-value pair.
The subroutine can abort the iteration by returning 0 and should always return 1 otherwise.
param "sub": A subroutine reference or name to be called on each item in the table
param @filter: Only keys matching one of the entries in the filter will be processed
o get()
$val = $table->get($key);
@val = $table->get($key);
Get the value(s) associated with a given key.
After this call, the data is still in the table.
param $table: The table to search for the key
param $key: The key to search for
return: In the scalar context the first matching value returned. (The oldest in the table, if there is more than one value.) In the
list context the whole table is traversed and all matching values are returned. If nothing matches undef is returned.
o unset();
$table->unset($key);
Remove data from the table
param $table: The table to remove data from
param $key: The key of the data being removed
o merge()
$table->merge($key => $val);
Add data to a table by merging the value with data that has already been stored
param $table: The table to search for the data
param $key: The key to merge data for
param $val: The data to add
remark: If the key is not found, then this function acts like add()
o overlap()
overlap($table_a, $table_b, $flags);
For each key/value pair in $table_b, add the data to $table_a. The definition of $flags explains how $flags define the overlapping
method.
param $table_a: The table to add the data to.
param $table_b: The table to iterate over, adding its data to %table_a.
param $flags: How to add the $table_b to $table_a.
When $flags == "APR_OVERLAP_TABLES_SET", if another element already exists with the same key, this will over-write the old data.
When $flags == "APR_OVERLAP_TABLES_MERGE", the key/value pair from $table_b is added, regardless of whether there is another element
with the same key in $table_a.
remark: This function is highly optimized, and uses less memory and CPU cycles than a function that just loops through table b calling
other functions.
o overlay()
$new_table = overlay($table_base, $table_overlay, $pool);
Merge two tables into one new table. The resulting table may have more than one value for the same key.
param $pool: The pool to use for the new table
param $table_overlay: The first table to put in the new table
param $table_base: The table to add at the end of the new table
return: A new table containing all of the data from the two passed in
TIE Interface
"APR::Table" also implements a tied interface, so you can work with the $table object as a hash reference.
The following tied-hash function are supported: FETCH, STORE, DELETE, CLEAR, EXISTS, FIRSTKEY, NEXTKEY and DESTROY.
remark: "APR::Table" can hold more than one key-value pair sharing the same key, so when using a table through the tied interface, the
first entry found with the right key will be used, completely disregarding possible other entries with the same key. The only exception to
this is if you iterate over the list with each, then you can access all key-value pairs that share the same key.
perl v5.8.0 2002-05-19 TABLE(1)