In the Ruby string :
"${0} ${1} ${2:hello}"
is ${i} the ith argument in the command that called this particular file.
Tried searching the web for “Ruby ${0}” however the search engines don’t like non-alphanumeric characters.
Consulted a Ruby book which says #{…} will substitute the results of the code in the braces, however this does not mention ${…}, is this a special syntax to substitute argvalues into a string, thanks very much,
Joel
As mentioned above
${0}will do nothing special,$0gives the name of the script,$1gives the first match from a regular expression.To interpolate a command line argument you’d normally do this:
However, ARGV is also aliased as
$*so you could also writePerhaps that’s where the confusion arose?