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

Version Path
beaker-6.4.1 lib/beaker/host/freebsd/exec.rb
beaker-6.4.0 lib/beaker/host/freebsd/exec.rb
beaker-6.3.0 lib/beaker/host/freebsd/exec.rb
beaker-6.2.0 lib/beaker/host/freebsd/exec.rb
beaker-6.1.0 lib/beaker/host/freebsd/exec.rb
beaker-5.8.1 lib/beaker/host/freebsd/exec.rb
beaker-5.8.0 lib/beaker/host/freebsd/exec.rb
beaker-5.7.0 lib/beaker/host/freebsd/exec.rb
beaker-5.6.0 lib/beaker/host/freebsd/exec.rb
beaker-5.5.0 lib/beaker/host/freebsd/exec.rb
beaker-5.4.0 lib/beaker/host/freebsd/exec.rb
beaker-5.3.1 lib/beaker/host/freebsd/exec.rb
beaker-5.3.0 lib/beaker/host/freebsd/exec.rb
beaker-5.2.0 lib/beaker/host/freebsd/exec.rb
beaker-5.1.0 lib/beaker/host/freebsd/exec.rb
beaker-5.0.0 lib/beaker/host/freebsd/exec.rb