LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Closed Thread
 
Search this Thread
Old 03-14-2010, 03:29 PM   #1
stp001
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
Bash infinite loop problems?


Hi Guys,
I seem to have a problem with with this bash script.I suspect that it has something to do with the infinite while loop.In addition to that the
array element also has incorrect syntax.
here is the code
please help
Thanks
--------------------------------------------------------
#1/bin/bash
clear
#set -x
IFS_OLD= $IFS

ans=$(zenity --list --text "please check all parameters for the Web page" --checklist --column "Pick" --column "Parameters" TRUE "title" TRUE "H1" TRUE "para1" TRUE "para2" TRUE "imageURL" \
--separator=":") ; echo "$ans"

IFS=':'

parray=""
arrAns=""
inc=0

for param in $ans
do
parray[$inc]=$param
inc= $(( inc++ ))
done

echo ${#parray[@]}

inc=1
while $inc -le ${#parray[@]}
do

while true
do
test_param= $(zenity --entry --text "Please enter ${#parray[$inc]} for the webpage")

if [ $? -eq 0 ] && [ -n "$test_param" ] ; then
arrAns["$inc"]= $test_param
inc= $(( inc++ ))
break
fi
done
done
#echo ${#arrAns[@]}
#EOF
 
Old 03-14-2010, 03:41 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
http://www.linuxquestions.org/questi...roblem-795293/

You were given some decent advice in your first thread, of which this one is a duplicate.

I see you also disregarded my suggestion to use CODE tags, making for a very hard-to-read bunch of code.

This thread is going to be closed. Please do not post your question in more than one place, and do not just disregard help and advice given to you previously, and start a new thread while leaving the old thread to drift off into oblivion.

Thanks. Closure pending.

Sasha
 
Old 03-14-2010, 03:41 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Is this a continuation of your earlier thread?

If so, we could make faster progress if you continued it in that thread and followed the advice given there, including posting your code in code tags (that's a link to instructions or you may prefer to use "Advanced Edit" mode which has a # button for code tags).
 
  


Closed Thread

Tags
infinite, loops


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash infinite loop problem? stp001 Linux - Newbie 6 03-15-2010 07:56 AM
infinite loop on fclose()? joe2748 Programming 10 03-05-2010 09:09 PM
Bash script - Infinite loop caused by a logical OR operator skuzye Programming 9 02-04-2009 02:31 PM
Infinite Loop ewt3y Programming 3 08-16-2005 10:48 AM
infinite loop beginner_84 Programming 5 08-15-2004 03:32 AM


All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration