Difficult Filtering Problem

Sir,
I have a file containing say 1000 lines that contain 100 paragraphs of 10 lines each separated by blank lines.I have to match a pattern or a string "hdfhasdjkasdhs" and print the complete paragraphs containing these strings.I can do this with the help of line editor ex,but how can I use Shell(sh) to perform this operation.I DO NOT have a C shell or CSH.Please tell me what combination I should use in sed/awk or is there any other way to do it.

Try this:

#! /usr/bin/ksh
target=hdfhasdjkasdhs

sed -n -e "
:loop
s/^$//
t test
H
n
b loop
:test
g
s/${target/${target}/
t want
s/^.*//
h
d
:want
p
:final
s/^.*//
h"
exit 0