Sponsored Content
Full Discussion: Problem with Korn Shell
Top Forums Shell Programming and Scripting Problem with Korn Shell Post 302183314 by sasaliasim on Tuesday 8th of April 2008 08:02:29 PM
Old 04-08-2008
almost there.....

My script almost works. Now, I'm not getting any errors, but the values for RecCount and RecCount2 are not printing. I tried running the following commands outside of the shell and got results of 3000000 and 5000000, so I know that the tables contain data:

>db2 -x "select count(*) from schema.table"
>db2 -x "select count(*) from schema.table2"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

2. Shell Programming and Scripting

how to convert from korn shell to normal shell with this code?

well i have this code here..and it works fine in kornshell.. #!/bin/ksh home=c:/..../ input=$1 sed '1,3d' $input > $1.out line="" cat $1.out | while read a do line="$line $a" done echo $line > $1 rm $1.out however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies

3. Shell Programming and Scripting

problem with set command in korn shell

I have to copy an array to a temp variable and back after doing some functions. I am trying to see if it is possible to do without while loops.My closest try was set -A temp ${THE_ARRAY} # restore array after some actions set -A THE_ARRAY ${temp} The problem with above is that, the new... (1 Reply)
Discussion started by: vijay1985
1 Replies

4. UNIX for Dummies Questions & Answers

problem extracting substring in korn shell

hi all, I have read similiar topics in this board, but i didn' t find the posting which is the same with the problem i face.. I try to extract string from the end. i try to do this: num=abcdefghij num2=${num:-5} echo $num2 #this should print the last 5 characters (fghij) but it doesn;t... (3 Replies)
Discussion started by: nashrul
3 Replies

5. Shell Programming and Scripting

korn shell automation problem!

I got the task writting Korn Shell script to automate the tuxedo login so that users neednot have to enter options manually. I have done that using expect tool from the Unix but my manger told me its not secure so you have to do that using Kornshell without using Expect. Here is the way to login to... (0 Replies)
Discussion started by: pareshan
0 Replies

6. Shell Programming and Scripting

AIX Korn shell sed -s problem

In a Korn shell script I have, cat ../header | sed -e 's/flag1/$cnumb/g' > header.txt The header is short {{Company flag1}} But the result in header.txt is {{Company $cnumb}} The value of $cnumb is 120. I am trying to get the value of $cnumb into the header. I have tried /'$cnumb'/g,... (10 Replies)
Discussion started by: jcarrott
10 Replies

7. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

8. Shell Programming and Scripting

unix korn shell leap years problem

Write a function called dateToDays that takes three parameters -a month string such as Sep, a day number such as 18, and a year number such as 1962-and return s the number of days from January 1, 1900, to the date. Notes: I am asking you to account for leap years. my script is not... (0 Replies)
Discussion started by: babuda0059
0 Replies

9. Shell Programming and Scripting

korn shell display lenght problem!!! i got stuck on this

Using the KSH, write a shell script called display_by_length, which takes an absolute pathname to a directory and displays all ordinary files in the directory ordered by their length; for each file listed, display the name of the file and its length - nothing else. Extend this script to take an... (1 Reply)
Discussion started by: babuda0059
1 Replies

10. Shell Programming and Scripting

self-learning! my korn shell problem

i am a beginner i m learning shell by myself i have problem writing a korn shell that takes an absolute pathname to directory and display all ordinary files in the directory ordered by their length. i was thinking use grep ls sort and sed. maybe, i m wrong! can someone tell me? (2 Replies)
Discussion started by: babuda0059
2 Replies
SQL::Translator::Schema::Trigger(3pm)			User Contributed Perl Documentation		     SQL::Translator::Schema::Trigger(3pm)

NAME
SQL::Translator::Schema::Trigger - SQL::Translator trigger object SYNOPSIS
use SQL::Translator::Schema::Trigger; my $trigger = SQL::Translator::Schema::Trigger->new( name => 'foo', perform_action_when => 'before', # or after database_events => [qw/update insert/], # also update, update_on, delete fields => [], # if event is "update" on_table => 'foo', # table name action => '...', # text of trigger schema => $schema, # Schema object scope => 'row', # or statement ); DESCRIPTION
"SQL::Translator::Schema::Trigger" is the trigger object. METHODS
new Object constructor. my $schema = SQL::Translator::Schema::Trigger->new; perform_action_when Gets or sets whether the event happens "before" or "after" the "database_event". $trigger->perform_action_when('after'); database_event Obsolete please use database_events! database_events Gets or sets the events that triggers the trigger. my $ok = $trigger->database_events('insert'); fields Gets and set which fields to monitor for "database_event". $view->fields('id'); $view->fields('id', 'name'); $view->fields( 'id, name' ); $view->fields( [ 'id', 'name' ] ); $view->fields( qw[ id name ] ); my @fields = $view->fields; table Gets or set the table on which the trigger works, as a SQL::Translator::Schema::Table object. $trigger->table($triggered_table); on_table Gets or set the table name on which the trigger works, as a string. $trigger->on_table('foo'); action Gets or set the action of the trigger. $trigger->action( q[ BEGIN select ...; update ...; END ] ); is_valid Determine whether the trigger is valid or not. my $ok = $trigger->is_valid; name Get or set the trigger's name. my $name = $trigger->name('foo'); order Get or set the trigger's order. my $order = $trigger->order(3); scope Get or set the trigger's scope (row or statement). my $scope = $trigger->scope('statement'); schema Get or set the trigger's schema object. $trigger->schema( $schema ); my $schema = $trigger->schema; compare_arrays Compare two arrays. equals Determines if this trigger is the same as another my $is_identical = $trigger1->equals( $trigger2 ); AUTHORS
Anonymous, Ken Youens-Clark <kclark@cpan.org>. perl v5.14.2 2012-01-18 SQL::Translator::Schema::Trigger(3pm)
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy