Link to home
Start Free TrialLog in
Avatar of basirana
basirana

asked on

While loop break

We have a shell script that reads extdata.txt and extracts the information and merges the data into a table. There two while loops in the program. The inner loop is iterating too many times.
The requirement is we need to extract data only for 12 threads but it is running more number of time and extracting same data. Need to help to restrict the number of iterations.

Thanks
heartbeat-timestamp.sh
extdata.txt
SOLUTION
Avatar of tel2
tel2
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of basirana
basirana

ASKER

It is working now. It is a append problem
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi basirana,

Could you show us exactly what the problem was, please?
And how did you discover it?

Thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@simon3270,
Thanks for your correction to my "exit 0" comment.  Didn't realise that.  Good to know.

@basirana,
When deleting a question, instruction #2 that appears on the webpage is:
'Did you find your own solution? If you did, please click "Cancel", post your solution, and then close the question by clicking "Accept as Solution" on your own post.'
I don't think "It is working now. It is a append problem" gives enough detail for anyone to see what you have done to fix this.

I know I've basically asked this before, but I haven't yet seen a reply from you, so:
1. Could you show us exactly how you fixed the problem, please?  (I suggest you provide the new code, or at least the changes.)
2. And how did you discover the cause of the problem?

Thanks.
thanks