6 lines
No EOL
105 B
Ruby
6 lines
No EOL
105 B
Ruby
def sh(cmd)
|
|
out = `#{cmd} 2>/dev/null`.to_s.strip
|
|
out.empty? ? "" : out
|
|
rescue
|
|
""
|
|
end |