Sha256: 52247b30a243855d1cf0861b76c274733bc8cfa0673b391567d94607b46cd13e

Contents?: true

Size: 312 Bytes

Versions: 151

Compression:

Stored size: 312 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

151 entries across 151 versions & 1 rubygems

Version Path
beaker-3.18.0 lib/beaker/host/freebsd/exec.rb
beaker-3.17.0 lib/beaker/host/freebsd/exec.rb
beaker-3.16.0 lib/beaker/host/freebsd/exec.rb
beaker-3.15.0 lib/beaker/host/freebsd/exec.rb
beaker-3.14.0 lib/beaker/host/freebsd/exec.rb
beaker-3.13.0 lib/beaker/host/freebsd/exec.rb
beaker-3.12.0 lib/beaker/host/freebsd/exec.rb
beaker-3.11.0 lib/beaker/host/freebsd/exec.rb
beaker-3.10.0 lib/beaker/host/freebsd/exec.rb
beaker-3.9.0 lib/beaker/host/freebsd/exec.rb
beaker-3.8.0 lib/beaker/host/freebsd/exec.rb
beaker-3.7.0 lib/beaker/host/freebsd/exec.rb
beaker-3.6.0 lib/beaker/host/freebsd/exec.rb
beaker-2.52.0 lib/beaker/host/freebsd/exec.rb
beaker-3.5.0 lib/beaker/host/freebsd/exec.rb
beaker-3.4.0 lib/beaker/host/freebsd/exec.rb
beaker-3.3.0 lib/beaker/host/freebsd/exec.rb
beaker-3.2.0 lib/beaker/host/freebsd/exec.rb
beaker-3.1.0 lib/beaker/host/freebsd/exec.rb
beaker-3.0.0 lib/beaker/host/freebsd/exec.rb