毎回ググるのでまとめる
- 最初の検索文字列で分割したい
- 前
${v%%=*}
(aa=bb=cc
をaa
に ) - 後
${v#*=}
(aa=bb=cc
をbb=cc
に )
- 前
- 変数があるときにだけオプション指定
${opt:- --option="$opt" }
Go to list of users who liked
More than 3 years have passed since last update.
毎回ググるのでまとめる
${v%%=*}
( aa=bb=cc
を aa
に )${v#*=}
( aa=bb=cc
を bb=cc
に )${opt:- --option="$opt" }
Register as a new user and use Qiita more conveniently
Go to list of users who liked