for new code I prefer pure ruby so cmd = "ls '/sys/bus/ccw/devices/#{channel}/block/' | tr -d '\n'"