Reputation: 3058
Sometimes in Unix kind of Operating Systems, just pasting a command in terminal executes the command instead of pasting and hitting enter. Is there a special reason for this behaviour ? Why is this useful ?
Upvotes: 2
Views: 720
Reputation: 229
You pasted a newline character with it which executes the command
Upvotes: 3
Reputation: 143047
You have to be careful on how you copy (highlight) the command. If you go past the end of the command (or the next line), you are also copying the newline, so when you paste it, you'll get the newline acting like the <enter>
key.
Once you know that, this feature can actually be quite nice .. especially if you do want the command to execute each time you paste.
Upvotes: 5