Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRonald Greer
Front End Web Development Techdegree Graduate 56,430 PointsI've been having trouble with this one all day
the main question I've been having trouble with is question 2 of 6. the command I've been using is dugdig/macpan.sh any ideas what I'm doing wrong?
3 Answers
Jeff Muday
Treehouse Moderator 28,722 PointsYeah, that was a slightly tricky quiz -- it is easy to get tripped up on some of those questions the first time if you don't read the question carefully. At some point Linux/MacOS command line becomes second nature since it is used daily.
What they are looking for is this below.
$ ./macpan.sh
A big takeaway from any computer course is that there are always multiple ways to do things, so don't get too worried if you didn't think about that method at first.
It is, however, important to know that the ./
prefix refers to files in the current directory, since this is a UNIX/Linux/BSD way to refer to files in the current directory.
Jeff Muday
Treehouse Moderator 28,722 PointsYes-- you're correct! (you get the picture now!)
Additional "caveats"
./dugdig.sh
must have its executable bit set. (you can fix this with a$ chmod +x dugdig.sh
)If your shell script didn't have its execute bit set:
You would have to execute by using the shell as an interpreter (often /bin/sh
or if in your path, just sh
)
e.g. $ /bin/sh ./dugdig.sh
Ronald Greer
Front End Web Development Techdegree Graduate 56,430 Pointsim still getting bummer, could i possibly have a syntax error with: $./dugdig.sh?
Jeff Muday
Treehouse Moderator 28,722 PointsMaybe this is what you were looking for?
../
refers to the parent directory
./
refers to the current directory
Ronald Greer
Front End Web Development Techdegree Graduate 56,430 PointsRonald Greer
Front End Web Development Techdegree Graduate 56,430 PointsSo would it be $./dugdig.sh ?