I used the Terminal application in Mac OS X to remove some hidden files (i believe this uses the bash shell by default). I inadvertently misspelt my command and, upon hitting the Enter key, my prompt cursor changed from:

username$

to simply:

>

I could only exit to the previos cursor with CTRL + D. Had I entered a sub-session for a different shell? Why did this happen?

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

You started a shell structure (quoted string, for or while loop, etc.) and bash was waiting for you to complete it. You can press CtrlC to abort the command.

link|improve this answer
@EddieCatflap: It's known as the PS2 secondary prompt. See "Prompting" in man bash. – Dennis Williamson Nov 28 '10 at 23:29
Ok now I know why the shell was behaving like this and it makes much more sense now that I have read further on the topic, thank you guys. – Andy Bowskill Nov 29 '10 at 0:09
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.