2 ms·
Upvoted. I guess I was thinking more along the lines of one shouldn't use raw_input() when you're expecting a pipe since it only takes one line. $ ps | py
by dec0dedab0de 13y ago
Upvoted. I guess I was thinking more along the lines of one shouldn't use raw_input() when you're expecting a pipe since it only takes one line.
$ ps | python -c 'print raw_input()'
PID TTY TIME CMD
But I suppose you could just loop to get around that anyway.