Skip to content
Prev 178231 / 398506 Next

use of "input" in system()

On Fri, 24 Apr 2009, Mike Miller wrote:

            
In sh, both of these commands execute ls:

echo ls | `cat /dev/stdin`
echo ls | `cat -`

In R, both of these simply hang until I hit ctrl-c...
...but the stdin is getting to the command because both of these return 
"ls" to stdout:
So what am I missing?  I don't understand why the backtick method isn't 
working.  Is there another way to do this?

Mike