I have 2 functions on AIX.
Func_A () {
....
....
}
Func_B () {
....
....
}
And I have a abc.txt file (multiple lines) and I would like to read line by line and pass line by line to Func_A & Func_B.
once Func_A is done,pass same value to Func_B and in the mean time get second line from txt file and pass it to Func_A
and only 4 lines can be active any given moment.
Example
line_1 --> Func_A (done) ---> continue with Func_B (processing)
line_2 --> Func_A (done) ---> continue with Func_B (processing)
line_3 --> Func_A (done) ---> continue with Func_B (processing)
line_4 --> Func_A (done) ---> continue with Func_B (processing)
I want to wait until func_B is done for line_1 before I continue reading the line_5. Please let me know if I am not explain well?
Thanks. Reading a file is not an issue. I can't straighten up the logic, how can I read second line while first line is working on Func_B and how can I limit 4 lines?
What I meant was, I can't figure out how to handle read of second line while working on first line (Func_B is still processing line_1) and limit them at 4.