LoginSignup
1

More than 5 years have passed since last update.

Bashでワイルドカード展開を無効にする

Posted at

ユーザー入力のデータや、AA等を扱っている際に、*が自動的に展開されて困る場合があります(ありました)
単純な解決策:
* オプションセッティングで解決 できます。

set -f

-fはワイルドカード展開を無効化するオプションのようです。
そのため、展開されていない所のみ有効化してやれば望んだ通りのことができます。

set -f
# your work here...
set +f

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1