How to exit from cat command from terminal program.

Asked by Richard Hamitt

Hi.

I use the command cat>binary.txt. Then I type in what I want in the file like this:

generic

But how do I exit after typing the information? I tried several keyboard keys but they are just written on the screen ( I think ascii ). Neither typing exit nor quit seem to respond. I just exit the terminal program but that is cumbersome if there are more commands to do.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Christophe Painchaud
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Sayak Banerjee (sayakb-deactivatedaccount) said :
#1

Try oressing Ctrl+C

Revision history for this message
Sayak Banerjee (sayakb-deactivatedaccount) said :
#2

Try pressing Ctrl+C

Revision history for this message
Richard Hamitt (rch-auto-maskin) said :
#3

Thanks Sayak Banerjee, that solved my question.

Revision history for this message
Sayak Banerjee (sayakb-deactivatedaccount) said :
#4

Glad I could help!

Revision history for this message
Richard Hamitt (rch-auto-maskin) said :
#5

That helped with exiting from the cat command, but the information I typed is not used in the project. If I exit from the terminal program right after entering the information, the information is used. I am not sure if it is problem with the project or with the terminal program itself.

Revision history for this message
Best Christophe Painchaud (dash-ionblast) said :
#6

when someone solves your question, use the menu to select his answer as the right answer. It will mark your question as solved

Revision history for this message
Richard Hamitt (rch-auto-maskin) said :
#7

Thank you but it did not really solve the problem. I did find that I must use Ctrl+D to save and exit what I type in. Ctrl+C just exits.