LoginSignup
0
0

More than 1 year has passed since last update.

bash 変数展開

Last updated at Posted at 2021-05-21

毎回ググるのでまとめる

  • 最初の検索文字列で分割したい
    • ${v%%=*} ( aa=bb=ccaa に )
    • ${v#*=} ( aa=bb=ccbb=cc に )
  • 変数があるときにだけオプション指定
    • ${opt:- --option="$opt" }
0
0
0

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
0
0