Scarlet & Grey
Ohio State University
School of Music


Music 824: Help for Assignment #2


Several questions in this assignment require an understanding of how the command shell interprets special characters like the octothorpe (#), apostrophe ('), and hyphen (-). Without this understanding, users are apt to find the shell's behavior confusing. For example, in searching for **kern staccato markings, a common approach might be to try the following command:

grep ' syrinx
Unfortunately, the command interpreter will respond by generating a secondary prompt (">"):
grep ' syrinx
>

At this point, the shell is actually waiting for you to finish typing the command. What is going on?

Several characters, including the apostrophe ('), have a special meaning to the shell command interpreter. The shell treats the apostrophe as a way of quoting material that the user wants treated as a single object. Consequently, apostrophies normally appear in pairs -- beginning and ending the quoted material. The reason why the shell outputs a secondary prompt (">") is because it is expecting a matching apostrophe. You can get out of this situation by either typing a "closing" apostrophe, or by typing CONTROL-C -- which will cause the shell to ignore the current command.

In order to understand what is going on, it is important to read the documentation about the shell interpreter. A short description can be found in the Humdrum User Guide. Now is a good time to read this description.

Having read this explanation, it will be clear that in order to treat the apostrophe literally, we must escape it using the backslash character:

grep \' syrinx