#!/bin/sh clean_files="*.core" for file in ${clean_files}; do find "${HOME}" -maxdepth 2 -iname "*.core" -exec rm {} \; done