How can I exit/undo a redirection?-and get back the $


I’m currently working on this quiz and I made a mistake in #8 by typing cat > gymnastics.txt instead of cat < gymnastics.txt. How can I quit this redirection or undo it? and start again with bash since it disappeared after my redirection mistake.


Seems the program got stuck, you could send an interrupt signal(ctrl + c)?

Thank you for your help!

I left this window open and once I came back I had to start all over again and somehow I no longer had this issue, although I’ve had this problem before while doing the Command Line course. I’ll try that if it happens again.

The standard way to signal end of file would be Ctrl+D if you use cat in this way (at least if you still wanted to save to that file). Be careful about double pressing it though as EOF often exits your current shell; at least that’s what my friend says :wink:.