"pablo.fernan...@cscs.ch" <pablo.fernan...@cscs.ch> writes:
> Do you know what am I doing wrong? How do I capture the system() > output? Try using %x{} instead of system. The system() function returns the return code of the process, not the output. Oh, and "chomp" the extra whitespace off the output. If you're new to ruby, you can test ruby code in "irb", interactive ruby. irb> %x{hostname --fqdn}.chomp => "dagon.fnord.no" -- Stig Sandbeck Mathisen Any sufficiently advanced incompetence is indistinguishable from malice -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.