From: Fosiul Alam Date: 2012-09-03T05:06:19+09:00 Subject: capture system command output Hi my bellow command #!/usr/bin/ruby require 'rubygems' `parted -s /dev/cciss/c0d12 primary 0 100%` puts $?.to_i its showing 0, but it should show 1 because check the command line from comand line parted -s /dev/cciss/c0d12 mkpart primary 0 100% Error: Can't have overlapping partitions. # echo $? 1 then why from ruby is showing different ?? thanks -- Posted via http://www.ruby-forum.com/.