help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems sending bash text to file


From: Greg Wooledge
Subject: Re: Problems sending bash text to file
Date: Sat, 5 Feb 2022 18:32:49 -0500

On Sat, Feb 05, 2022 at 01:34:56PM -0800, M.R.P. zensky wrote:
> I am wanting to send a bash screen with text to a file. How do I do this?

First thing you should know: bash does not have "screens".  Bash is a
shell, which runs *inside* of a terminal (or terminal emulator).  It's
the terminal emulator which provides the visible "screen".

If you want to copy the text from your terminal emulator into a file,
the easiest and most natural way would be to highlight all of the text
with your mouse, then in a second terminal, type "cat > somefile",
then paste the text with the mouse, then press Ctrl-D on a new line to
end the cat.

After that, you may find that there's extraneous whitespace which you
need to edit away.  It'll depend on your terminal, and how it keeps
track of whitespace.

If your terminal emulator supports an alternative way to save the current
content to a file, then perhaps you can do that.  E.g. if you're inside
tmux or screen, one of them may have the feature you're looking for.
Otherwise, simply use the mouse.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]