Method: Specinfra::Command::Linux::Base::File.check_attribute
- Defined in:
- lib/specinfra/command/linux/base/file.rb
permalink .check_attribute(file, attribute) ⇒ Object
[View source]
11 12 13 14 |
# File 'lib/specinfra/command/linux/base/file.rb', line 11 def check_attribute(file, attribute) "lsattr -d #{escape(file)} 2>&1 | " + "awk '$1~/^[A-Za-z-]+$/ && $1~/#{escape(attribute)}/ {exit 0} {exit 1}'" end |