hi im using $read to loop through a file but whenever a blank line comes up..the script stops. there is nothing wrong with my script (i checked by removing the blank lines), how can i stop this from happening?
I would also like to know how i can write these blank lines to the file (for the output)
thanks
Probabilly you use something like:
var %i = 1
while ($read(file.txt,n,%i)) {
echo -a line %i : $ifmatch
inc %i
}
This will stop at first empty line, but u can use $lines to avoid this:
var %i = 1, %l = $lines(file.txt)
while (%i <= %l) {
echo -a line %i : $read(file.txt,n,%i)
inc %i
}
This also shows empty lines
