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-2.51.0 lib/beaker/host/freebsd/exec.rb
beaker-2.50.0 lib/beaker/host/freebsd/exec.rb
beaker-2.49.0 lib/beaker/host/freebsd/exec.rb
beaker-2.48.1 lib/beaker/host/freebsd/exec.rb
beaker-2.48.0 lib/beaker/host/freebsd/exec.rb
beaker-2.47.1 lib/beaker/host/freebsd/exec.rb
beaker-2.47.0 lib/beaker/host/freebsd/exec.rb
beaker-2.46.0 lib/beaker/host/freebsd/exec.rb
beaker-2.45.0 lib/beaker/host/freebsd/exec.rb
beaker-2.44.0 lib/beaker/host/freebsd/exec.rb
beaker-2.43.0 lib/beaker/host/freebsd/exec.rb
beaker-2.42.0 lib/beaker/host/freebsd/exec.rb
beaker-2.41.0 lib/beaker/host/freebsd/exec.rb
beaker-2.40.0 lib/beaker/host/freebsd/exec.rb
beaker-2.39.0 lib/beaker/host/freebsd/exec.rb
beaker-2.38.1 lib/beaker/host/freebsd/exec.rb
beaker-2.38.0 lib/beaker/host/freebsd/exec.rb
beaker-2.37.0 lib/beaker/host/freebsd/exec.rb
beaker-2.36.0 lib/beaker/host/freebsd/exec.rb
beaker-2.35.0 lib/beaker/host/freebsd/exec.rb