How to read file line by line with fixed number of characters
I want to read line by line with fixed number of characters like
rtriuyiiuyjv yhtuyiu yyuyiu fghtryyiukigdfsnmvv mrtkjtrk
hfdgruiuouoiujjvjb rot uyoth ertewpoyu iuoreworu 9yo
rertryuyuiy rewttruityouj eryotruioj tettryuyu
ryrutyiu eyruti ytyutiui tryuitye
erewtyruti ytrryui uyui6ryyrurbyuyiey"
in this i want to read with 10 character at a time, if the 10th character is the end of line then i want to take total line
if the 10th character is in between the line, i want to skip the cuurent line and it has to take up to the previous line ...........
1) it has to take total line otherwise it has to leave ........
2) with fixed characters ..