I/P file has data as follows:
Y
REQUIRES Z
A
REQUIRES B
C
REQUIRES D
REQUIRES E
REQUIRES F
G
REQUIRES H
I
REQUIRES J
EXACT OUTPUT FILE REQUIRED:
Y REQUIRES Z
A REQUIRES B
C REQUIRES D
C REQUIRES E
C REQUIRES F
G REQUIRES H
I REQUIRES J
I am using while loops to traverse the file.
while read line
do
if (condition)
{..
}
while read anoterline
do
done
done <inputfile
The problem I am facing is that
1) when inner while loop traverses say 4 lines and i break the inner loop the outer while loop's offset is set to the offset at which the inner while has stopped.
2)So I am missing the 4 lined data in execution of my outer loop. I need the outer while loop to start off from the offset at which it had stopped.