Re: Executing shell commands from Ruby... again.
- From: Kevin Skrenes <kevin.skrenes@xxxxxxxxxxxxxxx>
- Date: Sat, 17 Mar 2007 06:25:34 +0900
Jan Friedrich wrote:
How about this:
# -- BEGIN OF EXAMPLE
# setting command, param, input, output
# ...
cmd = <<END_OF_STRING
echo off
cd path\executabledir
#{command} -S #{param} #{input} #{output}
END_OF_STRING
system(cmd)
# -- END OF EXAMPLE
That makes perfect sense, but for some reason I'm getting this error:
: can't find string "END_OF_STRING" anywhere before EOF
: syntax error, unexpected $end, expecting tSTRING_CONTENT or
tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
I'm still working on it, but this solution seems to be ideal as long as
I can get it to function properly.
Alex, you're exactly right, I certainly have no problems using variables
to construct a String. :) I was merely saying that the batch file
solution was insufficient because I can't create its content
dynamically. Thanks for your reply, I'll check out the file you
provided.
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Executing shell commands from Ruby... again.
- From: Stefano Crocco
- Re: Executing shell commands from Ruby... again.
- References:
- Executing shell commands from Ruby... again.
- From: Kevin Skrenes
- Re: Executing shell commands from Ruby... again.
- From: Jan Friedrich
- Executing shell commands from Ruby... again.
- Prev by Date: Re: Calculating the age given DOB
- Next by Date: Re: Calculating the age given DOB
- Previous by thread: Re: Executing shell commands from Ruby... again.
- Next by thread: Re: Executing shell commands from Ruby... again.
- Index(es):
Relevant Pages
|