Is there a way to copy or paste text into bash without the use of a mouse? I'm thinking of a text file "file.txt" which contains command sequences which I would like to touch up before running.
I don't want to use an editor for this. Just the line editing functions of bash. Offhand the only (untested) solution I can think of is something like "cat file.txt >> .bash_history", subsequently invoking another bash session. Is this stupid (dangerous)? Does someone have a better solution?