9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
2. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
3. Shell Programming and Scripting
I am use unix shell script to called an sql Script to query data in my shell program.
sqlplus -S /nolog @update.sql
but my script on function "sysdate" not work !!
Could you tel me,How can i use function "sysdate" on unix or can replace the other function in my script to get data in system... (5 Replies)
Discussion started by: krai
5 Replies
4. UNIX for Dummies Questions & Answers
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
im a new student in programming and im stuck on this question so please please HELP ME. thanks.
the question is this:
enter a command to delete all files that have filenames starting with labtest, except labtest itself (delete all files startign with 'labtest' followed by one or more... (2 Replies)
Discussion started by: soccerball
2 Replies
7. UNIX for Advanced & Expert Users
i have two rules in my pf.conf file, "pass in all" and "pass out all"
i was having issues with getting pf working to begin with, so i went with
starting from nothing and working on up.
i have an ultrasparc ultra1 200e, with an added 4-port fast ethernet sbus
card, running "3.4 GENERIC#85... (4 Replies)
Discussion started by: xyyz
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
We have a Digital Unix Server with OSF.
There's a Kernel Parameter "dflssiz" on this server.
I just want to know, what it means.
Thanks (2 Replies)
Discussion started by: sameerdes
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0.
Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ?
I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc.
... (1 Reply)
Discussion started by: sameerdes
1 Replies
SQL::Translator::Schema(3pm) User Contributed Perl Documentation SQL::Translator::Schema(3pm)
NAME
SQL::Translator::Schema - SQL::Translator schema object
SYNOPSIS
use SQL::Translator::Schema;
my $schema = SQL::Translator::Schema->new(
name => 'Foo',
database => 'MySQL',
);
my $table = $schema->add_table( name => 'foo' );
my $view = $schema->add_view( name => 'bar', sql => '...' );
DESCSIPTION
"SQL::Translator::Schema" is the object that accepts, validates, and returns the database structure.
METHODS
as_graph_pm
Returns a Graph::Directed object with the table names for nodes.
add_table
Add a table object. Returns the new SQL::Translator::Schema::Table object. The "name" parameter is required. If you try to create a
table with the same name as an existing table, you will get an error and the table will not be created.
my $t1 = $schema->add_table( name => 'foo' ) or die $schema->error;
my $t2 = SQL::Translator::Schema::Table->new( name => 'bar' );
$t2 = $schema->add_table( $table_bar ) or die $schema->error;
drop_table
Remove a table from the schema. Returns the table object if the table was found and removed, an error otherwise. The single parameter can
be either a table name or an "SQL::Translator::Schema::Table" object. The "cascade" parameter can be set to 1 to also drop all triggers on
the table, default is 0.
$schema->drop_table('mytable');
$schema->drop_table('mytable', cascade => 1);
add_procedure
Add a procedure object. Returns the new SQL::Translator::Schema::Procedure object. The "name" parameter is required. If you try to
create a procedure with the same name as an existing procedure, you will get an error and the procedure will not be created.
my $p1 = $schema->add_procedure( name => 'foo' );
my $p2 = SQL::Translator::Schema::Procedure->new( name => 'bar' );
$p2 = $schema->add_procedure( $procedure_bar ) or die $schema->error;
drop_procedure
Remove a procedure from the schema. Returns the procedure object if the procedure was found and removed, an error otherwise. The single
parameter can be either a procedure name or an "SQL::Translator::Schema::Procedure" object.
$schema->drop_procedure('myprocedure');
add_trigger
Add a trigger object. Returns the new SQL::Translator::Schema::Trigger object. The "name" parameter is required. If you try to create a
trigger with the same name as an existing trigger, you will get an error and the trigger will not be created.
my $t1 = $schema->add_trigger( name => 'foo' );
my $t2 = SQL::Translator::Schema::Trigger->new( name => 'bar' );
$t2 = $schema->add_trigger( $trigger_bar ) or die $schema->error;
drop_trigger
Remove a trigger from the schema. Returns the trigger object if the trigger was found and removed, an error otherwise. The single parameter
can be either a trigger name or an "SQL::Translator::Schema::Trigger" object.
$schema->drop_trigger('mytrigger');
add_view
Add a view object. Returns the new SQL::Translator::Schema::View object. The "name" parameter is required. If you try to create a view
with the same name as an existing view, you will get an error and the view will not be created.
my $v1 = $schema->add_view( name => 'foo' );
my $v2 = SQL::Translator::Schema::View->new( name => 'bar' );
$v2 = $schema->add_view( $view_bar ) or die $schema->error;
drop_view
Remove a view from the schema. Returns the view object if the view was found and removed, an error otherwise. The single parameter can be
either a view name or an "SQL::Translator::Schema::View" object.
$schema->drop_view('myview');
database
Get or set the schema's database. (optional)
my $database = $schema->database('PostgreSQL');
is_valid
Returns true if all the tables and views are valid.
my $ok = $schema->is_valid or die $schema->error;
get_procedure
Returns a procedure by the name provided.
my $procedure = $schema->get_procedure('foo');
get_procedures
Returns all the procedures as an array or array reference.
my @procedures = $schema->get_procedures;
get_table
Returns a table by the name provided.
my $table = $schema->get_table('foo');
get_tables
Returns all the tables as an array or array reference.
my @tables = $schema->get_tables;
get_trigger
Returns a trigger by the name provided.
my $trigger = $schema->get_trigger('foo');
get_triggers
Returns all the triggers as an array or array reference.
my @triggers = $schema->get_triggers;
get_view
Returns a view by the name provided.
my $view = $schema->get_view('foo');
get_views
Returns all the views as an array or array reference.
my @views = $schema->get_views;
make_natural_joins
Creates foriegn key relationships among like-named fields in different tables. Accepts the following arguments:
o join_pk_only
A True or False argument which determins whether or not to perform the joins from primary keys to fields of the same name in other
tables
o skip_fields
A list of fields to skip in the joins
$schema->make_natural_joins(
join_pk_only => 1,
skip_fields => 'name,department_id',
);
name
Get or set the schema's name. (optional)
my $schema_name = $schema->name('Foo Database');
translator
Get the SQL::Translator instance that instantiated the parser.
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
perl v5.14.2 2012-01-20 SQL::Translator::Schema(3pm)