Aug 14, 2015, 6:40 AM
Post #2 of 2
The error message in your "die" suggests that your system defines a "working area". The logic suggests that a "working area" consists of a directory and all its sub-directories. The presence of a file with the name ".MARKER" in a directory indicates that the directory is the top of a "working area". Your code fragment verifies that the current program ($0) is in a "working area". (It dies with the message if it is not)
Re: [jeffdox] Finding top dir in my sys
[In reply to]
Now I can answer your specific questions.
tests for the presence of the file (not a directory or symbolic link) ".MARKER" in the current working directory.
In most operating systems, ".." is a special directory name. It refers to the directory which contains the current working directory. So, the command
moves the current directory up one level by changing to the directory which contains it.