If the file has special properties that you're looking for then grep is a useful tool

otherwise I guess a bunch of if's and stuff is needed, but it's doable in a one liner

Code:
print_it=0; for i in $(cat test.txt|sed -e "s/^\(.*\)$/\"\1\"/"); do i=$(echo $i|sed -e "s/^\"\(.*\)\"/\1/"); [ $print_it -eq 1 ] && echo $i && print_it=0; print=$(echo $i|grep "^$" > /dev/null; echo $?); [ $print -eq 0 ] && print_it=1; done
To clarify it i'll split it up like a script

Code:
#!/bin/bash
# Just setting this to avoid a -eq unary operator error.
print_it=0
# Loop throu the text file. Since there's nasty whitespaces in this file we encase all the lines with quotation.
# Change test.txt to the file name.
for i in $(cat test.txt|sed -e "s/^\(.*\)$/\"\1\"/"); do
# And now we remove it for this particular itteration
i=$(echo $i|sed -e "s/^\"\(.*\)\"/\1/")
# Check if the previous spin yielded a "blank" row
if [ $print_it -eq 1 ];then
# If it did, print the line and reset the variable.
echo $i
print_it=0
fi
# Get status code for the content of the current row to see if it's a blank or not.
print=$(echo $i|grep "^$" > /dev/null; echo $?)
# If it was a blank we set the variable for the next itteration
if [ $print -eq 0 ]; then
print_it=1
fi
done
sajko@hanna:~> sh test.sh
aaa
bbb
ccc
from a file looking like this:
Code:
aaa
111
bbb
222
333
ccc
555
If the file has a special formatting it's probably easier to check for occurrences, but since you only supplied that the file contains blank rows and then the actual thing you're looking for is this is the best I can do.
Hope this gives you a clue anyway

Best regards
Fredrik Eriksson