How can I expand both a variable name and a wildcard in a file name?

ساخت وبلاگ

I have a bash script where $DIR is a directory name that may contain spaces.

This:

rm "$DIR/*.MOV"

gives the error "No such file or directory". There is no file literally named "*.MOV"; I want the * to expand into multiple arguments - one per matching filename.

Eg:

rm some folder/foo.MOV some folder/bar.MOV

How can I do this?

Recent Questions...
ما را در سایت Recent Questions دنبال می کنید

برچسب : نویسنده : استخدام کار superuser بازدید : 278 تاريخ : شنبه 29 اسفند 1394 ساعت: 17:51