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-4.30.0 lib/beaker/host/freebsd/exec.rb
beaker-4.29.1 lib/beaker/host/freebsd/exec.rb
beaker-4.29.0 lib/beaker/host/freebsd/exec.rb
beaker-4.28.1 lib/beaker/host/freebsd/exec.rb
beaker-4.28.0 lib/beaker/host/freebsd/exec.rb
beaker-4.27.1 lib/beaker/host/freebsd/exec.rb
beaker-4.27.0 lib/beaker/host/freebsd/exec.rb
beaker-4.26.0 lib/beaker/host/freebsd/exec.rb
beaker-4.25.0 lib/beaker/host/freebsd/exec.rb
beaker-4.24.0 lib/beaker/host/freebsd/exec.rb
beaker-4.23.2 lib/beaker/host/freebsd/exec.rb
beaker-4.23.1 lib/beaker/host/freebsd/exec.rb
beaker-4.23.0 lib/beaker/host/freebsd/exec.rb
beaker-4.22.1 lib/beaker/host/freebsd/exec.rb
beaker-4.22.0 lib/beaker/host/freebsd/exec.rb
beaker-4.21.0 lib/beaker/host/freebsd/exec.rb
beaker-4.20.0 lib/beaker/host/freebsd/exec.rb
beaker-4.19.0 lib/beaker/host/freebsd/exec.rb
beaker-4.18.0 lib/beaker/host/freebsd/exec.rb
beaker-4.17.0 lib/beaker/host/freebsd/exec.rb