# Pipe in read-only mode%p(ls).open_r.each { |line|print line;};var str1 =`ls`;# backtick: returns a stringvar str2 =%x(ls);# ditto, alternative syntaxSys.system('ls');# system: executes a command and prints the resultSys.exec('ls');# replaces current process with another