How about somehting like:
for i in `cat file.txt`; do
if [ `echo "$i" | grep bleh` ]; then
I'm not too sure how you would be best to get the $new variable as I'm not sure what your line looks like from your description. You could probably use awk.