Find Output Formatting

Greetings,
I need to find few patterns related to password (pwsd, pwd, password etc) in a directory includig sub -directories.
I need to redirect the output of find (in combination with grep) to a file which will be later used to verify the files.
OS is Sun Solaris 5.10.
The out put file format needs tp be as below-
//
-------------------------------------------------------------------------
File name = <Absolute Path of the file >
Pattern Matching Line Number =<Line number>
Pattern matching Line =<Line>
-------------------------------------------------------------------------
File name = <Absolute Path of the file >
Pattern Matching Line Number =<Line number>
Pattern matching Line =<Line>
-------------------------------------------------------------------------
/
/
I am using below command . However I am not sure how do i format the output. Appreciate your expert advice/suggestions.
Code-

#!/bin/ksh
find_matches()
{
DIR=$1;
FILE=$2;
find ${DIR}/. \( -name "*proper*" -o -name "*.txt" -o -name "*.csv" \) -n -exec grep -i pwd {} \; -print >> ${FILE}
find ${DIR}/. \( -name "*proper*" -o -name "*.txt" -o -name "*.csv" \) -n -exec grep -i password {} \; -print >> ${FILE}
find ${DIR}/. \( -name "*proper*" -o -name "*.txt" -o -name "*.csv" \) -n -exec grep -i pswd {} \; -print >> ${FILE}
}
find_matches ${DIR1} ${tmp_file}
find_matches ${DIR2} ${tmp_file}

Could you explain what is the use of "-n" switch in this find command? I tried looking it up in man page, but couldn't find anything. This code should do what you want:

find ${DIR}/. \( -name "*proper*" -o -name "*.txt" -o -name "*.csv" \) -n -exec grep -ni pwd {} \; \
-print | awk -F: '{n=$1;p=$2;getline;print "----\nFile Name = "$0"\nPattern Matching Line Number \
= "n"\nPattern matching Line = "p}END{print "----"}' >> ${FILE}

You just need to adjust number of "-" in those line separators.

# find . \( -name "*proper*" -o -name "*.txt" -o -name "*.csv" \) -exec  grep -n pwd {} /dev/null \; >> outputn ; 
 sed 's/\(.*\):\(.*\):\(.*\)/ \File name = < \1 > \
 Pattern Matching Line Number = < \2 > \
 Pattern matching Line = < \3 > \
 ------------------------------------------- \ /' outputn
 
 File name = < ./12.txt >
 Pattern Matching Line Number = < 1 >
 Pattern matching Line = < sdafsadfasfFpwd  >
 -------------------------------------------
 File name = < ./12.txt >
 Pattern Matching Line Number = < 2 >
 Pattern matching Line = < owddpwdfafafa >
 -------------------------------------------
 

Thanks a lot for the replies. It worked like a charm.
Regarding -n, its my fault. I should have written as grep argument not find.