** Changed in: ubuntu-manual
       Status: New => Confirmed

** Changed in: ubuntu-manual
     Assignee: (unassigned) => Jason.Cook599 (jason-cook599)

-- 
Incorrect shell code regarding tilde expansion
https://bugs.launchpad.net/bugs/587848
You received this bug notification because you are a member of Ubuntu
Manual Bugs, which is subscribed to Ubuntu Manual.

Status in Ubuntu Manual: Confirmed

Bug description:
In chapter 6, page 121 we find the following snippet
«
  If there are spaces in one of the directories, you will need to put quotation
marks around the path:
  $ cd "~/Music/The Beatles/Sgt. Pepper's Lonely Hearts Club Band/"
»
While the text is correct in stating that putting quotation marks around the 
path will allow the spaces to be treated as part of the path rather than as 
word separators, the tilde loses its meaning when quoted. I.e. try the 
following in a shell:

echo '~' "~" ~

See 
http://www.opengroup.org/onlinepubs/7990989775/xcu/chap2.html#tag_001_006_001 
about the rules regarding tilde expansion in POSIX shells.

In short, the correct command-line should be:
$ cd ~/"Music/The Beatles/Sgt. Pepper's Lonely Hearts Club Band/"
or
$ cd "$HOME/Music/The Beatles/Sgt. Pepper's Lonely Hearts Club Band/"



_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-manual-bugs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-manual-bugs
More help   : https://help.launchpad.net/ListHelp

Reply via email to