#author("2022-02-15T03:22:43+09:00","default:ryuichi","ryuichi")
* クォーテーションの中でクォーテーションを使う [#g6cab703]
** やりたいこと [#oacad000]
vim 'file 1.txt' 'file 2.txt' # (1)
alias v=vim 'file 1.txt' 'file 2.txt' # (2)
- (1)で '''file 1.txt''' と '''file 2.txt''' という二つのファイルを開いてvimで起動する
- これを、(2)のようにaliasに設定したい
- この場合は"(ダブルクォーテーション)でくくればよいが、'(シングルクォーテーション)でくくることを考える
** 方法 [#t00ffb8f]
*** 1. '(シングルクォーテーション)をいったん終わらせて"(ダブルクォーテーション)で'を表現する [#r724674b]
alias v='vim '"'"'file 1.txt'"'"' '"'"'file 2.txt'"'"''
- ''' v='vim ''' の後の ''' 'file 1.txt '''を