On 2010-07-30 06:18, Daniel Pittman wrote: > If this is a "voting" matter, let me put in a vote for passing a simple string > to the shell, and passing an array direct to exec, which is consistent with > the use of 'system' style commands in a whole bunch of sysadmin scripting > languages. > > Eg, this: > > exec { "foo": command => ['/bin/ls', '|' 'foo'] } > > will pass '|' 'foo' to the ls command, compared to: > > exec { "foo": command => "/bin/ls | foo" } > > ...which passes it to the default system shell.
I think this is a very reasonable suggestion, so +1 from me as well. But I'd like to point out the shellquote() function, which can give you the semantics of the first version already today: exec { "foo": command => shellquote("/bin/ls", "|", "foo"); } (There's actually a slight difference. Using shellquote() today will give you an intermediate shell process, making it somewhat less efficient.) /Bellman -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.