One more thing, I don't think it should matter but separate the pipe from the 
first EOS by a space. 

On Nov 14, 2011, at 9:05 PM, hiroysato <[email protected]> wrote:

> Hello Donovan.
> 
> Thank you for your information.
> 
> I tried two pattern. but It does not work correctly too.
> 
> role :server, "user@server"
> task :heredoctest, :roles => :server do
>  run  %Q{
>     cat<<EOS|wc -l
>       foo
>       foo
>       foo
> EOS
> 
>  }
> end
> 
> role :server, "user@server"
> task :heredoctest, :roles => :server do
>  run  %Q{
>     cat<<EOS|wc -l
>       foo
>       foo
>       foo
> EOS
> #
>  }
> end
> 
> 
>  * executing `heredoctest'
>  * executing "cat<<EOS|wc -l \\\n       foo \\\n       foo \\\n
> foo \\\nEOS\\\n#"
>    servers: ["server"]
>    [user@server] executing command
> *** [err :: user@server] sh: line 5: warning: here-document at line 5
> delimited by end-of-file (wanted `EOS')
> *** [err :: user@server] wc:
> *** [err :: user@server] foo
> *** [err :: user@server] : No such file or directory
> *** [err :: user@server]
> *** [err :: user@server] wc:
> *** [err :: user@server] foo
> *** [err :: user@server] : No such file or directory
> *** [err :: user@server]
> *** [err :: user@server] wc:
> *** [err :: user@server] foo
> *** [err :: user@server] : No such file or directory
> *** [err :: user@server]
> *** [err :: user@server] wc:
> *** [err :: user@server] EOS#
> *** [err :: user@server] : No such file or directory
> *** [err :: user@server]
> ** [out :: user@server] 0 total
>    command finished in 48ms
> failed: "sh -c 'cat<<EOS|wc -l \\\n       foo \\\n       foo \\
> \n       foo \\\nEOS\\\n#'" on user@server
> 
> 
> On 11月15日, 午前1:24, Donovan Bray <[email protected]> wrote:
>> Try putting a line ending after EOS
>> 
>> EOS
>> 
>>  }
>> 
>> Also you can do
>> 
>> run %Q{
>>   ...
>> 
>> }
>> 
>> And get rid of the intermediate variable.
>> 
>> On Nov 14, 2011, at 1:17 AM, hiroysato <[email protected]> wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> EOS
>>>  }
> 
> -- 
> * 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

Reply via email to