Sha256: d2de7dce5aa0d5ce507ccd60184be1f1e1633367e88a3eaa33810567f538c795
Contents?: true
Size: 308 Bytes
Versions: 2
Compression:
Stored size: 308 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
beaker-2.11.0 | lib/beaker/host/freebsd/exec.rb |
beaker-2.10.0 | lib/beaker/host/freebsd/exec.rb |