Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Help to optimize script running time Post 302469132 by yahyaaa on Thursday 4th of November 2010 08:57:52 PM
Old 11-04-2010
Thank you Jim

Input data sample:

Zain500Disc;46464564;560;;0;0;Active;2011-02-04 22:59:00;0;1970-01-01 00:00:00;0;1970-01-01 00:00:00;0;1970-01-01 00:00:00;1970-01-01 00:00:00;2011-03-06 22:59:00;2011-06-05 22:59:00;TRUE;FALSE;0;0;0000;FALSE;TRUE;false;FALSE;0;true;0;true;true;TRUE;false;{00962795901649|00 962796371949|00962796859686|00962795293754|00962796859676};0;TRUE;{00963966107669};0;TRUE;{};0;TRUE; ;false;TRUE;FALSE;FALSE;2;FALSE;FALSE;;0;0;0;0;0;2;(FnF_1,-108,01.01.2025 23:59:59:999);(FnF_2,-108,01.01.2025 23:59:59:999);

ZainEazy;4646464;1;2000;0;0;Active;2016-09-10 22:59:00;0;2006-12-11 22:59:00;0;2009-05-26 22:59:00;0;1970-01-01 00:00:00;1970-01-01 00:00:00;2016-10-10 22:59:00;2017-01-09 22:59:00;TRUE;FALSE;0;0;0000;FALSE;TRUE;false;FALSE;0;true;0;true;true;TRUE;false;{};2;TRUE;{};0;TRU E;{};0;TRUE;;false;TRUE;FALSE;FALSE;2;FALSE;FALSE;;0;0;0;0;0;2;(FnF_1,-108,01.01.2025 23:59:59:999);

Jaishana;34535353;2776;;0;0;Active;2011-04-23 23:59:59;0;2006-03-07 23:59:00;0;2010-05-31 23:59:00;0;1970-01-01 00:00:00;1970-01-01 00:00:00;2011-05-23 23:59:59;2011-08-22 23:59:59;TRUE;FALSE;0;0;0000;FALSE;TRUE;false;FALSE;0;true;0;true;true;TRUE;false;{};2;TRUE;{};0;TRU E;{};0;TRUE;102;TRUE;TRUE;FALSE;FALSE;2;FALSE;FALSE;;0;0;0;0;0;2;(FnF_1,-108,01.01.2025 23:59:59:999);(CUG,-128,01.01.2025 00:00:00:000);

ZainQuattro;43534535;6406;4000;0;0;Active;2011-01-14 22:59:00;0;1970-01-01 00:00:00;0;2010-04-26 23:59:00;0;1970-01-01 00:00:00;1970-01-01 00:00:00;2011-02-13 22:59:00;2011-05-15 22:59:00;TRUE;FALSE;0;0;0000;FALSE;TRUE;false;FALSE;0;true;0;true;true;TRUE;false;{00962795500047|00 962795600207|00962799106309|00962795782960};0;TRUE;{00963941950270|00963947278825|00963966531175};0; TRUE;{};0;TRUE;;false;TRUE;FALSE;FALSE;2;FALSE;FALSE;;0;0;0;0;0;2;(FnF_1,-108,01.01.2025 23:59:59:999);(FnF_2,-108,01.01.2025 23:59:59:999);


This is a sample of input date, the program simply group lines and count them based on field number 1... field 1 is used as index for all arrays used..
it's in awk.... but I dont know why it's very slow, even it's fast somehow for low records !!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to compare latest logfile with the current running time of the script

how can i compare the latest log file with the current time.. consider i am running a script "a.sh" at 09:00 ( function of the script a.sh is to update the database ) this script is going to create logfile if the script is sucess in case of failure it is not going to create logfile.. ... (0 Replies)
Discussion started by: mail2sant
0 Replies

2. Shell Programming and Scripting

display time required to complete running script

hi is there any way i can display a countdown time needed to run a script? like load a counter at the beginning of the script with the estimated time and display the counter decrementing till it finishes running the script? (3 Replies)
Discussion started by: npatwardhan
3 Replies

3. Shell Programming and Scripting

Running batches of files at a time from a script

Hi I have a script that performs a process on a file. I want to know how to include a function to run a batch of files? Here is my script #!/bin/bash #---------------------------------------------------------------------------------------------------------------------- #This... (2 Replies)
Discussion started by: ladyAnne
2 Replies

4. Shell Programming and Scripting

Help in running a script after a particular time

Unix Gurus, I have a requirement where the shell script needs to do specific tasks after certain period of time. Daily we receive few files in a particular folder. The script does the file renaming, pass parameters to run some web services and pushes to remote FTP location. But my... (3 Replies)
Discussion started by: shankar1dada
3 Replies

5. Shell Programming and Scripting

How to know the exact running time of script!

Hi All, newbie here, I'm just wondering how can i know the exact running time of my script? Please advise, THanks, (1 Reply)
Discussion started by: nikki1200
1 Replies

6. Shell Programming and Scripting

Find the script running time and subtract from sleeptime

HI Guys, I want to find out the script running time and subtract from sleeptime. My Script Below Give me error :- #!/usr/bin/ksh timeout=100 start=$SECONDS sleep 20 end=$SECONDS echo "Time: $((end - start)) " ScTime = $((end - start)) (1 Reply)
Discussion started by: asavaliya
1 Replies

7. Shell Programming and Scripting

Setting time for running of the script

Dear all, I wonder if it is possible that we can run the script from time to time..I meant, it should repeat the sourcing of the script by itself? In my case, I need to source this script manually from time to time, like once in every 10 minutes. emily, (2 Replies)
Discussion started by: emily
2 Replies

8. Shell Programming and Scripting

Example of running script with time limits?

Hi, I want to write a script that does some sort of health check on the database. It will query the database for information, some query takes long and some are quick. For example, inside the script I will do something as below: #!/bin/ksh run_query_01 & run_query_02 &... (1 Reply)
Discussion started by: newbie_01
1 Replies

9. Shell Programming and Scripting

Kill long running script, if it crosses the threshold time

Hi, I need a script to kill the process if it running for long time. Inputs for the scripts: 1.test.sh (will be running fron cron scheduler) 2.1 hr (ie threshold_time - if the test.sh is running for more than 1 hr test.sh has to kill) Thanks, Divya (1 Reply)
Discussion started by: Divya Nochiyil
1 Replies

10. Shell Programming and Scripting

Killing the process if running for long time in script

I am running a script which will read the data from fail line by line and call the Java program by providing the arguments from the each line. The Java code is working fast for few records and for some records its getting hanged not providing response for morethan one hour. Currently am... (4 Replies)
Discussion started by: dineshaila
4 Replies
SLAQTR(l)								 )								 SLAQTR(l)

NAME
SLAQTR - solve the real quasi-triangular system op(T)*p = scale*c, if LREAL = .TRUE SYNOPSIS
SUBROUTINE SLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK, INFO ) LOGICAL LREAL, LTRAN INTEGER INFO, LDT, N REAL SCALE, W REAL B( * ), T( LDT, * ), WORK( * ), X( * ) PURPOSE
SLAQTR solves the real quasi-triangular system op(T)*p = scale*c, if LREAL = .TRUE. or the complex quasi-triangular systems op(T + iB)*(p+iq) = scale*(c+id), if LREAL = .FALSE. in real arithmetic, where T is upper quasi-triangular. If LREAL = .FALSE., then the first diagonal block of T must be 1 by 1, B is the specially structured matrix B = [ b(1) b(2) ... b(n) ] [ w ] [ w ] [ . ] [ w ] op(A) = A or A', A' denotes the conjugate transpose of matrix A. On input, X = [ c ]. On output, X = [ p ]. [ d ] [ q ] This subroutine is designed for the condition number estimation in routine STRSNA. ARGUMENTS
LTRAN (input) LOGICAL On entry, LTRAN specifies the option of conjugate transpose: = .FALSE., op(T+i*B) = T+i*B, = .TRUE., op(T+i*B) = (T+i*B)'. LREAL (input) LOGICAL On entry, LREAL specifies the input matrix structure: = .FALSE., the input is complex = .TRUE., the input is real N (input) INTEGER On entry, N specifies the order of T+i*B. N >= 0. T (input) REAL array, dimension (LDT,N) On entry, T contains a matrix in Schur canonical form. If LREAL = .FALSE., then the first diagonal block of T must be 1 by 1. LDT (input) INTEGER The leading dimension of the matrix T. LDT >= max(1,N). B (input) REAL array, dimension (N) On entry, B contains the elements to form the matrix B as described above. If LREAL = .TRUE., B is not referenced. W (input) REAL On entry, W is the diagonal element of the matrix B. If LREAL = .TRUE., W is not referenced. SCALE (output) REAL On exit, SCALE is the scale factor. X (input/output) REAL array, dimension (2*N) On entry, X contains the right hand side of the system. On exit, X is overwritten by the solution. WORK (workspace) REAL array, dimension (N) INFO (output) INTEGER On exit, INFO is set to 0: successful exit. 1: the some diagonal 1 by 1 block has been perturbed by a small number SMIN to keep nonsingularity. 2: the some diagonal 2 by 2 block has been perturbed by a small number in SLALN2 to keep nonsingularity. NOTE: In the interests of speed, this routine does not check the inputs for errors. LAPACK version 3.0 15 June 2000 SLAQTR(l)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy