Code:
> cat file31
999999000 "Name" "this is text for line one
line two
line three"
888888000 "Yep" "All on one line"
777777111 "Yes" "Another good text"
555555999 "Name" "this is other text for line one
line two
line three"
> cat calc_file31
rm file32
while read line
do
if [ `echo "$line" | tr -d " " | grep '"$'` ]
then
echo "$line""~" >>file32
else
echo "$line" >>file32
fi
done <file31
cat file32 | tr "\n" " " | tr "~" "\n"
> calc_file31
999999000 "Name" "this is text for line one line two line three"
888888000 "Yep" "All on one line"
777777111 "Yes" "Another good text"
555555999 "Name" "this is other text for line one line two line three"
>