Quantcast
Channel: How to paste multiple Bash commands into a shell without losing some? - Super User
Viewing all articles
Browse latest Browse all 4

Answer by Nevin Williams for How to paste multiple Bash commands into a shell without losing some?

$
0
0

I make such cuts and pastes into my favourite text editor, named appropriately, where I can then carefully look for extraneous characters, and ensure that I'll be running what I expect to be running. I'm strongly adverse to cutting and pasting code snippets into an interactive shell: who knows what extra commands might be picked up by the cut & paste operation?

Once your text file has the verified commands saved, they can then be executed with the built-in command

source <filename>


Viewing all articles
Browse latest Browse all 4

Trending Articles