0

c:\users\misterfoo FINDSTR bar

I accidentally press enter while my command is incomplete. Then I have a cursor on a blank line. Whatever I type, command or gibberish, when I press enter I get a new line. CMD forgets that it runs commands and becomes a text editor.

CTRL C does nothing. I cannot backspace to erase the incomplete command, and my only option is to close and restart CMD. Pressing enter with an incomplete command should not mean I have to restart CMD.

  • a)ctrl-c gets out of it for me. b)any command that you can pipe to, will wait for input from keyboard and vice versa.. e.g. try echo ASDFbarASDF|findstr bar i'm not sure if they will all accept multiple lines though - perhaps. – barlop Nov 18 '15 at 19:55
  • (1) Ctrl+C works for me, too.  Also Ctrl+Z followed by Enter.  (2) @barlop: How does your (b) help the OP? – G-Man Says 'Reinstate Monica' Nov 19 '15 at 2:04
  • @G-Man he described some things happening, and one thing he described was a cursor on a blank line and being able to enter characters(, and in 'b', I gave some explanation for that. Giving info that can improve somebody's understanding is generally helpful. An increased understanding of what is happening is beneficial/helpful - with or without a solution. You'd be a very poor techie if you just applied things or looked for answers without understanding or looking to understand, what was going on. – barlop Nov 19 '15 at 9:05
  • @barlop: OK, you were explaining that the findstr bar command wasn't hung, but was simply reading from the keyboard (and searching any typed input for the word "bar").  I see that now.  (But David said the same thing (38 seconds earlier!)  And I'm not sure your comment is worded in a way that will be comprehensible to somebody at the OP's level of understanding.  And I still don't really understand the bit about accepting multiple lines.) – G-Man Says 'Reinstate Monica' Nov 19 '15 at 17:29
  • @G-Man I think his was hung his ctrl-c didn't work, but that's still inexplicable,y ctrl-c didn't work for him. But part of what he described, he didn't seem to be aware was normal operation.As4 the point about multiple lines, I don't yet get it to my satisfaction either.But as a general note,it's OK to write something that is not comprehensible to the OP e.g. maybe the OP will come back in 5 years,or maybe somebody else will get it. It's never just about the person asking..Or maybe a very curious OP might ask and ask until they understand, or maybe they won't 'cos they don't care.All is fine – barlop Nov 19 '15 at 21:20
0

It is doing what you asked it to do, reading its input and extracting "bar" strings from it. I'm not sure why you couldn't exit with control-C. That works for me.

|improve this answer|||||

Your Answer

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

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