Skip to main content
added 50 characters in body
Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

NeverDon't put quotes around tilde ~ if you expect the shell to expand it to your home, so:

SSH_CONFIG_FILE=~/.ssh/config

if you have space(s); do

var=~/'foo bar/file'

With the quotes on tilde, you prevent the shell to expand it to treat literally.

Never put quotes around tilde ~, so:

SSH_CONFIG_FILE=~/.ssh/config

if you have space(s); do

var=~/'foo bar/file'

Don't put quotes around tilde ~ if you expect the shell to expand it to your home, so:

SSH_CONFIG_FILE=~/.ssh/config

if you have space(s); do

var=~/'foo bar/file'

With the quotes on tilde, you prevent the shell to expand it to treat literally.

Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

Never put quotes around tilde ~, so:

SSH_CONFIG_FILE=~/.ssh/config

if you have space(s); do

var=~/'foo bar/file'