Hi all,
I need to read data from a file like e.g.
thread:1 file1.c:200
thread:1 file1.c:255
thread:1 file1.c:300
thread:2 file1.c:300
thread:2 file1.c:455
thread:2 file1.c:100
I know how to get each item by e.g.
for data in `cat data`
do
#do something
done
BUT how do I know when the data I get is on the next line? The above will just keep getting the data but I can't tell if there from the same lines or not (say if one line had 3 bits of data and next had 2).
Thanks for any help or pointers
LGJ
I need to read data from a file like e.g.
thread:1 file1.c:200
thread:1 file1.c:255
thread:1 file1.c:300
thread:2 file1.c:300
thread:2 file1.c:455
thread:2 file1.c:100
I know how to get each item by e.g.
for data in `cat data`
do
#do something
done
BUT how do I know when the data I get is on the next line? The above will just keep getting the data but I can't tell if there from the same lines or not (say if one line had 3 bits of data and next had 2).
Thanks for any help or pointers
LGJ