Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

after executing grep '19-12-2008 without ending the quote.i got stuck with > in command line how to exit

share|improve this question

migrated from Oct 23 '09 at 3:29

This question came from our site for professional and enthusiast programmers.

what shell are you using? – Nathan Fellman Oct 21 '09 at 11:24

End it by closing your quote (i.e. typing another apostrophe).

Or, if you've changed your mind and you don't want to execute the command any more, ctrlc will get you out of the command and back into the shell.

share|improve this answer

Just CTRL-C and start again, or type in 'ENTER on the next line. The prompt you're seeing (>) is because you haven't finished the command - the shell thinks you wanted that linefeed within a string and it's waiting for you to close that string with another quote.

share|improve this answer
At least with bash/grep, it's not treating the linefeed as a literal. echo -en hi | grep 'h ' (with single or double quotes, and with newlines instead of spaces) both pick up the hi. If you actually put spaces in the quotes, it does not pick up the hi. – Mark Rushakoff Oct 21 '09 at 11:27
Interesting, that must be a grep feature - it works with grep 'h<lf>i' but echo outputs it as I expected, with an embedded linefeed. – paxdiablo Oct 21 '09 at 12:15

escape your quotation mark with a backslash

$ grep \'19-12-2008
share|improve this answer

You must log in to answer this question.