The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
the given code goes in infinite loop and does not increment variable i mrityunjay22 Shell Programming and Scripting 6 12-26-2007 02:20 AM
pick the bug the server enters an infinite loop arjunjag High Level Programming 3 07-19-2007 02:53 AM
ls command in infinite Loop umakant SUN Solaris 3 07-17-2007 02:25 AM
Script not running in AutoSys ramsi_ece Shell Programming and Scripting 2 07-11-2007 12:43 PM
high priority thread contains an infinite loop rvan High Level Programming 0 02-14-2007 09:30 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-04-2007
sharmagaurav_2k sharmagaurav_2k is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 2
Thumbs down Infinite Loop in Autosys while running a shell script, Manual run is fine

Hi All,

I have a shell script, which runs fine manually, but goes into infinite loop, when run through Autosys Scheduler.
The part of code going in infinite loop is pasted below:


*************this is only a part of code*****************

i=0
while [ $i -lt $split ]
do
#echo start $start and end $end
sed -n ''$start','$end'p' $dir/$filename >> $dir/$fldr/input.csv
cat $dir/$fldr/header.csv $dir/$fldr/input.csv >> $dir/$fldr/input_`expr $i + 1`.csv
echo `date +%m%d%y_%T`--$dir/$fldr/input_`expr $i + 1`.csv created >> $log
rm -f $dir/$fldr/input.csv
start=`expr $end + 1`
if [ $i -eq `expr $split - 2` ]; then
start=`expr $end + 1`
end=`expr $filecnt`
else
end=`expr $start + $flsize - 1`
fi
#cat input_`expr $i + 1`.csv
let "i=$i+1"
done

***************************************************


in the last but one line, i am using
let"i=$i+1"

I tried using
i=`expr $i + 1`

but still the script goes in infinite loop...



Need some suggestions...
 

Bookmarks

Tags
autosys

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0