Appendix Bash Problem


#1

Am working through the appendix for Learn Python The Hard Way to familiarise myself with bash. However, in exercise 55.9.1 it shows us the pushd and popd commands t move around. When it says to type this:

cd temp
$ mkdir i/like/icecream

I do the exact the same thing in my terminal (Mac OSx) and get the following:

mkdir: i/like: no such file or directory.

i’m not sure what I"m doing wrong and it’d be great if someone could tell me. I’m going to move on from that exercise but I imagine it’s pretty important.


#2

ok nevermind it was because i wasn’t putting the -p in between mkdir and i/like/icecream. i can’t see where that is specifically mentioned in the chapter beforehand, though.


#3

So, in PowerShell on windows you don’t need the -p so I removed it. Are you maybe reading the wrong commands?


#4

Hm, I’m not sure. I’m using a mac and I followed these commands. Screenshot attached.


#5

Yes, you need the “-p” on macOS.
This screenshot is from the pdf version of the book. The pdf version is missing the “-p”.
The html version is correct. It has the “-p”.


#6

Hi Zed,

I encountered this issue myself when working through the command line appendix. As quoted above, the -p modifier for the mkdir command is missing from the .pdf at the beginning of exercise 55.9.1 (line 2). Just wanted to make sure this is the case. I understand the importance of typing in the commands exactly as we see them for beginners and this one had me confused for a while before I just decided to google the issue and found others having the same problem. Thanks for such a great approach to learning this stuff. I’m very much enjoying it.


#7

If you are on Windows you don’t need -p. You might be looking at the instructions for Windows when on a Mac.


#8

I’m fairly certain I’m looking at the right page. I quoted it above. Other people have this problem in the forum, I just don’t think anybody followed up with a reply to you that it was a possible misprint. Take a look…a screenshot of the currently downloadable .pdf is viewable above this post.


#9

Oh weird, yeah the -p is missing on the linux instructions but I fixed that ages ago in the Python 3 book. What book are you using again? When did you get it?


#10

I’m using the Python 3 .pdf. I downloaded it about a month ago.


#11

Awesome, I’ll confirm that it should be fixed … again.


#12

That’s the way it goes sometimes…but bug fixed! Thanks for being responsive.


#13

Yep, finally fixed it. Thanks for letting me know.