Double Spacing complex sed pipeline

my script:

 
FILE="$1"
echo "You Entered $FILE"
if [ -f $FILE ]; then
tmp=$(cat $FILE | sed '/./!d' | sed -n '/regex/,/regex/{/regex/d;p}'| sed -n '/---/,+2!p' | sed -n '/#/!p' | sed 's/^[\
]*//' | sed -e\
s/[^:]*:// | sed -n '/==> /!p' | sed -n '/--> /!p' | sed -n '/regex/,+1!p' | sed -n '/======/!p' | sed -n '/regex/!p' | sed -n '\
/regex/!p' | sed -n '/regex /!p')
fi
MyVar=$(echo $tmp > my.txt)
FILE2="$2"
if [ -f $FILE2 ]; then
tmp2=$(cat $FILE2 | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/#/!p' | sed -e s/[^:]*:// | sed /--------/,+10d)
fi
echo "You Entered $FILE2"
MyVar2=$(echo $tmp2 > my2.txt)
var=$(echo hi2.txt | sed '/^$/p' )
echo "$var"
cmp -b my.txt my2.txt

i know, i know. thats a long pipeline..my problem is that i cant seem to include anywhere in it to be able to double space it. sed G sed '/^$/p' or awk, they just really doesnt register. the sed pipeline is to long for me to do that.. ..

Anyways , what i have looks similar to the paragraph that i just typed. And probably this one when im through. the exception to this and my text file is that it has valid commands. nothing else. So it makes sense for me double space the file iim talking about and then somehow to use a loop to execute each line ( contaiing the comands ) .

i really struck. i really need help.

Hi,

it is hard to understand your many sed commands. Perhaps you can
give us an example of what you have and what you want to achieve.

If would combine your first sed-command to delete all blank lines
and double-space the rest at the same time.

sed '/./!d;/./{G}' test

Note: You don't need cat. Sed can take a file as argument.
Secondly you don't need to call sed multiple times which slows
down execution speed. You can execute many commands in one sed call,
simply separate them by ";" as in the example above. Or you write
a sed script and call it with the "-f" option.

HTH Chris