bash: Apostrophe in path -


on mac os x (bash 4.2), try cd folder apostrophe in path:

cd "~/documents/study/new/beej's guide unix ipc_code/examples" 

then got

-bash: cd: ~/documents/study/new/beej's guide unix ipc_code/examples: no such file or directory 

i tried escaping apostrophe this:

cd "~/documents/study/new/beej\'s guide unix ipc_code/examples" 

with result:

-bash: cd: ~/documents/study/new/beej\'s guide unix ipc_code/examples: no such file or directory 

the thing worked me hard escaping white spaces , apostrophe without double-quotes around this:

cd ~/documents/study/new/beej\'s\ guide\ to\ unix\ ipc_code/examples 

in case, there way can avoid hard escaping @ all?

the tilde (~) won't expanded inside quotes, need leave outside quotes. of these work:

cd ~/"documents/study/new/beej's guide unix ipc_code/examples" cd ~/documents/study/new/"beej's guide unix ipc_code"/examples cd ~/documents/study/new/beej"'s guide unix "ipc_code/examples 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -