method
shelljoin
v1_9_2_180 -
Show latest stable
- Class:
Shellwords
shelljoin(array)private
Builds a command line string from an argument list array joining all elements escaped for Bourne shell and separated by a space.
open('|' + Shellwords.join(['grep', pattern, *files])) { |pipe| # ... }
+Array#shelljoin+ is a shorthand for this function.
open('|' + ['grep', pattern, *files].shelljoin) { |pipe| # ... }