up vote 0 down vote favorite
share [g+] share [fb]

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

link|improve this question
what shell are you using? – Nathan Fellman Oct 21 '09 at 11:24
feedback

migrated from stackoverflow.com Oct 23 '09 at 3:29

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

3 Answers

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.

link|improve this answer
feedback

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.

link|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
feedback

escape your quotation mark with a backslash

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

Your Answer

 
or
required, but never shown