Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sometimes, when I paste things into Putty, it runs them automatically. Other times, it waits for me to his Enter before running the command. Why the erratic behavior?

share|improve this question
add comment

2 Answers

In the first instance, you're pasting the command with a newline, which is getting sent to the terminal and is equivalent to ENTER.

In the second instance you've copied and pasted a command without a newline, so it is waiting for ENTER to run the command.

share|improve this answer
    
If I make extra-double sure to only copy the command up to the last character, will that stop the newline from being copied? –  mattloaf1 Dec 12 '09 at 17:17
    
It will indeed. Copying and pasting is generally application specific on Windows, as they control access to the clipboard. So it can depend where you are copying from and what that does, but generally if you're quite careful about setting the marker just to the last character, and not further onto the end of the line (it's like an invisible line!) you normally get away with it. If you're not sure, I sometimes find selecting right to left instead of left to right can work –  Philip Reynolds Dec 12 '09 at 17:21
add comment

I would guess that you get a linefeed copied into the clipboard sometimes. To check if this is the case, try running clipbrd.exe or simply pasting the contents into your favorite control-char-displaying editor.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.