Method: Specinfra::Command::Solaris::V10::File.check_is_grouped

Defined in:
lib/specinfra/command/solaris/v10/file.rb

.check_is_grouped(file, group) ⇒ Object

reference: perldoc.perl.org/functions/stat.html

http://www.tutorialspoint.com/perl/perl_getgrgid.htm
[View source]

18
19
20
21
# File 'lib/specinfra/command/solaris/v10/file.rb', line 18

def check_is_grouped(file, group)
  regexp = "^#{group}$"
  "perl -e 'printf \"%s\", getgrgid((stat(\"#{escape(file)}\"))[5])'  | grep -- #{escape(regexp)}"
end