From: sin kanti Date: 2005-04-02T07:52:35+09:00 Subject: how to read output of shell command to variable? Hi, In perl, we can do $output = `file filename.txt`; How can i do this in Ruby? I know that there is system to run shell command like this; system("file","filename.txt") but how to return the output of "file" command to variable? Sinchai