Hacker News new | past | comments | ask | show | jobs | submit login

No, I just put my terminal into a mode where I could see what I pasted without any possibility executing it. If you don't give cat any arguments, it reads from stdin and writes to stdout.

I could have just as easily opened vim/emacs/notepad and done the same, or for that matter, written the contents to an actual file instead of redirecting the contents to /dev/null.




But you could still paste ^d (End-of-file)? Granted, if you paste ^d in the terminal, you'd exit, but one could do this?:

  dangerous-commands \n
  ^d #eof
  dangerous-commmands \n #repeat
(I'm not actually sure if you can paste ^d in general... but I expect you could?)


Great point, we've just fired another salvo in an escalating war. The only winning move is not to paste. :)


My dentist won't let me do that :(


Cool, I've used cat for years and never realized it would do that if you don't have something actually piping to it. Totally makes sense now.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: