awk search & delete located criteria

Guys,
I manages to get awk to search and print the files that I want to delete. However I am stuck on the delete portion.

Here is the command that I am using to fins these files.

find /usr/local/apache/conf/vhosts/ -type f | awk '/e$/'

The output is perfect. The files look like so:

/usr/local/apache/conf/vhosts/kydzradiolv.com\e
/usr/local/apache/conf/vhosts/stylefm.kyee
/usr/local/apache/conf/vhosts/foxcountry.useee
/usr/local/apache/conf/vhosts/old2-rooster101.kyee
/usr/local/apache/conf/vhosts/foxcountry.usee
/usr/local/apache/conf/vhosts/rooster101.kyee
/usr/local/apache/conf/vhosts/itm-eee
/usr/local/apache/conf/vhosts/king.orgeee
/usr/local/apache/conf/vhosts/old2-z99.kyee
/usr/local/apache/conf/vhosts/cjcy.loungeradio.caeee
/usr/local/apache/conf/vhosts/charityawardsprogram.useee

I want all of the findings deleted. I have tried the following with no luck:

find /usr/local/apache/conf/vhosts/ -type f | awk '/e$/d'

Any ideas?

Jaysunn

find /usr/local/apache/conf/vhosts/ -type f | awk '/e$/{system("rm " $0)}'

Why not

find /usr/local/apache/conf/vhosts/ -name "*e" -type f -exec rm {} \; 

Of course!, professional blindness :eek:

Hmm @dennis.jacob,

I thought that I needed the $ to anchor all the end e's. But your solution is correct.

Thanks.

Jaysunn