[Solved] Find and append line to output

Hi All,

I am trying to write a shell script but not getting desired output.
What i am trying to do.
1.I want to use find command command and then use it xargs/exec to append the find output.But i am not getting desired output

here is what i am trying to do

#find init*.ora -exec `echo "test123"` >> {} \;

One way .. (Include the highlighted part once satisfies with displayed output)

$ find dir_path -name "init*.ora" -type f | awk '{print "echo test123 >> "$0}' | sh

Hi jayan_jay,

Thanks for quick reply .The solution you provided is working perfect.I can understand most of the code you provided but couldnot understand what "sh" is doing.

Regards,
sahil

Directly executing the displayed output (without creating a temporary file and then execute it) ..

Thanks a lot for your help