I am using netezza sql query like below, and the table contains some 2k records in it.
I want to read the result record by record and pass it in the next set of sql steps.
when i use the above for loop it is reading the string line by line but if i have space or special characters between the string then it is considering as next line.
table contains the data like below.
Above piece of code is taking the first line Java but when coming to the next line, it is splitting and taking the first word in $course.
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Hi,
I had written a shell script to pass command line argument to variable in a function.
Here is my code:
main
if ; then
.$1
echo $1
get_input_file
else
echo "input file $1 is not available"
fi
get_input_file()
{
FILE = "$1"
echo $FILE
} (10 Replies)
When I run this:
PDHDURL=`/usr/bin/curl --silent http://www.phdcomics.com/comics.php | /usr/bin/grep -o http://www.phdcomics.com/comics/archive/.*.gif | head -1`
echo -e "$PHDURL"
It is totally blank. However, when I just run it from the terminal:
/usr/bin/curl --silent... (2 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Hi. I'm trying to write a script that reads a line on a file and runs a different command for a different line output.
For example, if it finds the word "Kuku" on the line it sends mail to Kuku@kuku.com. Otherwise, it sends mail to Lulu@lulu.com.
TIA. (2 Replies)
Hi,
I am calling a Perl script in my shell script. When Perl script is executed it asks for a answer to be entered by user from terminal. How can i pass that value from my shell script ??
I know I can change perl script to default the answer but i dont have access to do that so only option i... (5 Replies)
I have a test file with the following format, It contains the username_date when the user was locked from the database.
$ cat lockedusers.txt
TEST1_21062016
TEST2_02122015
TEST3_01032016
TEST4_01042016
I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
SQL::Translator::Schema::Procedure(3pm) User Contributed Perl Documentation SQL::Translator::Schema::Procedure(3pm)NAME
SQL::Translator::Schema::Procedure - SQL::Translator procedure object
SYNOPSIS
use SQL::Translator::Schema::Procedure;
my $procedure = SQL::Translator::Schema::Procedure->new(
name => 'foo',
sql => 'CREATE PROC foo AS SELECT * FROM bar',
parameters => 'foo,bar',
owner => 'nomar',
comments => 'blah blah blah',
schema => $schema,
);
DESCRIPTION
"SQL::Translator::Schema::Procedure" is a class for dealing with stored procedures (and possibly other pieces of nameable SQL code?).
METHODS
new
Object constructor.
my $schema = SQL::Translator::Schema::Procedure->new;
parameters
Gets and set the parameters of the stored procedure.
$procedure->parameters('id');
$procedure->parameters('id', 'name');
$procedure->parameters( 'id, name' );
$procedure->parameters( [ 'id', 'name' ] );
$procedure->parameters( qw[ id name ] );
my @parameters = $procedure->parameters;
name
Get or set the procedure's name.
$procedure->name('foo');
my $name = $procedure->name;
sql
Get or set the procedure's SQL.
$procedure->sql('select * from foo');
my $sql = $procedure->sql;
order
Get or set the order of the procedure.
$procedure->order( 3 );
my $order = $procedure->order;
owner
Get or set the owner of the procedure.
$procedure->owner('nomar');
my $sql = $procedure->owner;
comments
Get or set the comments on a procedure.
$procedure->comments('foo');
$procedure->comments('bar');
print join( ', ', $procedure->comments ); # prints "foo, bar"
schema
Get or set the procedures's schema object.
$procedure->schema( $schema );
my $schema = $procedure->schema;
equals
Determines if this procedure is the same as another
my $isIdentical = $procedure1->equals( $procedure2 );
AUTHORS
Ken Youens-Clark <kclark@cshl.org>, Paul Harrington <Paul-Harrington@deshaw.com>.
perl v5.14.2 2012-01-18 SQL::Translator::Schema::Procedure(3pm)