How to increase executions speed of loops.?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to increase executions speed of loops.?
# 1  
Old 01-11-2013
How to increase executions speed of loops.?

Quote:
Hi Am Using AIX Ksh shell
I have a Script that check totally 6 files for the past days files
I have used Array ,While Loop and More if loops in the scripts.
When i tried to run the Script for searching 365 days its takes nearly ten min to complete searching all the six files.

I might be thinking that because of the more if loops its going too slow ?
Can anyone help me how to increase the Execution Speed of the Script ?
# 2  
Old 01-11-2013
We cannot possibly say without seeing the script.
# 3  
Old 01-11-2013
Corona688 is right, it's difficult to impossible to pull a statement out of the blue. But in general, the less you do in loops in loops in loops, and the more you do in programs like awk, sed, and friends - running them once, using smart input/outout selection, and refraining from multiple calls - the better and faster your job will be done.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX 4.2 increase ethernet speed

Hello. I have a server RS/6000 with AIX 4.2. The server have a network card with 10/100mbps speed, but for some reason, the ethernet only runs at 10Mbps, it doesn,t matter if I put the net cable on a 100Mbps switch, it keeps running at 10Mbps speed.... I know how to view/change ethernet speed... (1 Reply)
Discussion started by: little_ball
1 Replies

2. Solaris

How to increase the e1000g0 interface speed in Solaris?

Hi All, Please let me know the step by step process to set the e1000g0 interface speed to 1000mbps with full duplex from 100fdx and how to disable the auto negotiation with switch?. Thanks and Regards, Ganesh. (7 Replies)
Discussion started by: gsrungav
7 Replies

3. Shell Programming and Scripting

Run script every minute and terminate after specified number of executions

when it runs and look at my acron.log file it generates an error as below /tmp/prog.sh: line 4: (12 Replies)
Discussion started by: azherkn3
12 Replies

4. Red Hat

Increase speed in linux server

Hi, Will removing space from the server increases the speed/performance. how are they related? please explain the relationship. thanks in advance regards, Pradeep (2 Replies)
Discussion started by: pradebban
2 Replies

5. Shell Programming and Scripting

Pausing between two executions in a shell script

HI, Please help me on this. I have to execute 100 scripts which i have redirected in to a file . I want to pause the script after first execution and once i say enter key word it has to go to next execution. My looks like for RUNFILES in `cat ${SOURCEFILES}/scripts` do echo $RUNFILES; ... (1 Reply)
Discussion started by: srichunduru
1 Replies

6. Filesystems, Disks and Memory

data from blktrace: read speed V.S. write speed

I analysed disk performance with blktrace and get some data: read: 8,3 4 2141 2.882115217 3342 Q R 195732187 + 32 8,3 4 2142 2.882116411 3342 G R 195732187 + 32 8,3 4 2144 2.882117647 3342 I R 195732187 + 32 8,3 4 2145 ... (1 Reply)
Discussion started by: W.C.C
1 Replies

7. Cybersecurity

how to increase the speed of sftp

hi , i have to tranfer some 12 - 13 gb of files from one server to anothier presently i m using the SFTP but it is taking to much time to trafer the files is there any way to use increase the efficiency of SFTP. i cant use the FTP (4 Replies)
Discussion started by: narang.mohit
4 Replies

8. Filesystems, Disks and Memory

dmidecode, RAM speed = "Current Speed: Unknown"

Hello, I have a Supermicro server with a P4SCI mother board running Debian Sarge 3.1. This is the "dmidecode" output related to RAM info: RAM speed information is incomplete.. "Current Speed: Unknown", is there anyway/soft to get the speed of installed RAM modules? thanks!! Regards :)... (0 Replies)
Discussion started by: Santi
0 Replies

9. Shell Programming and Scripting

Return Code of multiple inner executions

Need some clarification on two topics and I apologize for the long post. Topic 1). I have a PERL script which sends output to the console. This is executed like a daemon script. I would like to capture the "print" commands of the script to a log file. How can this be done. Topic 2) Within the... (9 Replies)
Discussion started by: jerardfjay
9 Replies

10. Post Here to Contact Site Administrators and Moderators

Anybody Notice a Speed Increase?

Hi. I moved this site to a T3 facility and wanted to know if any of the long time users noticed a performance improvement? Thanks, Neo. (5 Replies)
Discussion started by: Neo
5 Replies
Login or Register to Ask a Question