-2

My cat stepped on the keyboard today and the resulting garbage caused a ">" prompt to appear. The text was something like "~~~~~~~~~~~~~~~~YYYY~~~~~~~~~~~ ]]]]]]]]". I could not get the prompt to answer me. I tried things like "?, help, ls, q" etc and it would just make no answer and the prompt would come back. Is there anyway I can figure out what the prompt is?

Tyler Durden
  • 5,411
  • 16
  • 57
  • 96
  • you could have confused everyone and said that the `cat` command is producing weird results ...... lol – jsotola Feb 20 '19 at 06:50
  • Also a dupe of [In which situations are PS2, PS3, PS4 used as the prompt?](//unix.stackexchange.com/q/193659) which contains better explanations. – Kusalananda Feb 20 '19 at 08:16

1 Answers1

1

This is caused when something is entered into the terminal that looks like an expression that requires more input from the user or is a unclosed quotation that causes the terminal to also expect more input.

For Example if you type: echo "Hello then press enter, you get the carrot.

Then if you type " and press enter it will complete as expected. If you type anything else it behaves as you have seen until you " and then it will spit out what ever it was, or you will have to ^C.

Michael Prokopec
  • 2,202
  • 7
  • 21