Change the outer heredoc to use %Q{} notation. The inner heredoc will be part
of the string and ignored by ruby.
On Nov 13, 2011, at 3:35 AM, hiroysato <[email protected]> wrote:
>
> Dear members.
>
> Does anyone know better way to execute the following command on remote
> server??
>
> run <<-EOS
> cat<<EOF | command
> #{parameter}
> line2
> line3
> EOF
> EOS
>
> I tried to use here documents, but It does not work correctly.
> so I'm using the following
>
> run <<-EOS
> printf "#{parameter}\\nline2\\nline3\\n" > subfile;
> command subfile;
> EOS
>
> This is inconvenient. so I'm looking alternative way.
>
> My alternative idea is create subfile on local host and copy it.
> but If I can use here documents, It is best way for me.
>
> Sincerely.
>
> --
> Hiroyuki Sato.
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en