Bash で変数を作成して、いくつかのフォルダーにすばやくアクセスし、それを bash_profile スクリプト ファイルに保存しようとしています。スクリプトはこんな感じ
Documents=~/Documents
Apps=~/Library/Application\ Support/iPhone\ Simulator/5.1/Applications
スクリプトを実行した後、$Documents 変数は機能しますが、$Apps は機能しません。それは伝えます:
-bash: cd: /Users/myusername/Library/Application: No such file or directory
これは、フォルダーへのパスです。
/Users/myusername/Library/Application Support/iPhone Simulator/5.1/Applications
スペースをエスケープするにはどうすればよいですか? Vim を使用し、「cd $Apps」と入力します。