M HYPE SPLASH
// updates

Stuck when executing grep in unix

By Emily Wilson

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

1

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.

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.

2

escape your quotation mark with a backslash

$ grep \'19-12-2008

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy