shell function, sed, file, if test, scan directory