Other than bringing up a text editor, is there a way I can input text in a linux terminal directly to a file? (then enter a control code such as ctrl-c, to end the input)
I'm pretty sure there's a way to do this… I am SSH'd to a server with Docker, and running bash inside a container, so that I can test some stuff, I just want to be able to paste a small script in my terminal window, and have that output to a file inside the container's shell.
Thanks.
Best Answer
a useful use of
cat
: provide input on stdinor use a heredoc