Sha256: eea51b4bdc30cc43914da720252e6649b5fd7649da1dde02def5198d4b75c161
Contents?: true
Size: 314 Bytes
Versions: 16
Compression:
Stored size: 314 Bytes
Contents
module FreeBSD::Exec include Beaker::CommandFactory def echo_to_file(str, filename) # FreeBSD gets weird about special characters, we have to go a little OTT here escaped_str = str.gsub(/\t/, '\\t').gsub(/\n/, '\\n') exec(Beaker::Command.new("printf \"#{escaped_str}\" > #{filename}")) end end
Version data entries
16 entries across 16 versions & 1 rubygems