Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Unix 環境では、いくつかのファイルを削除する bash スクリプトがあります。
rm -f foo bar* baz*
私の問題: ワイルドカードが常に結果を返すとは限りません。その結果、常に存在する「foo」さえも削除できません。書き込まれる出力は「rm: No match」です。
簡単な回避策は、コマンドを分割することです。
rm -f foo rm -f bar* rm -f baz*
しかし、それは悪い解決策です。