I need to test if a file starting with "ant" is present in the directory. If that is present, I need to delete that file. The command that I am using now is
test -e $FILE_PATH/$FILE_NAME
I have defined
FILE_NAME="ant"
Putting * after the FILE_NAME is not working out.
rm -f "${FILE_PATH}/${FILE_NAME}"*
? Then the file(s) are gone either way! – Jeff Schaller Jul 27 '16 at 14:40