I see. @raw_file
is a File
object rather than the file name itself. Then you cannot invoke the cat(1)
command against the string representation of the File
object.
You should have wrote
tmp_raw.puts(`cat #{ARGV[0]} | cut -f1,6,3,4,2,5,9,12 | sort -k1,1 -k8,8`)