Forum: Ruby Re: Match until new line

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
825738339f48c5b8b2a72c02caf3d91c?d=identicon&s=25 Gavin Kistner (Guest)
on 2007-02-07 18:04
(Received via mailing list)
From: anon1m0us [mailto:anon1m0us@yahoo.com]
> WHat is sharelist = <<EOS ????

See: http://rubyurl.com/SSM
D4f5ba376e2d4e280889ed462939f632?d=identicon&s=25 anon1m0us (Guest)
on 2007-02-07 19:25
(Received via mailing list)
On Feb 7, 12:03 pm, "Gavin Kistner" <gavin.kist...@anark.com> wrote:
> From: anon1m0us [mailto:anon1m...@yahoo.com]
>
> > WHat is sharelist = <<EOS ????
>
> See:http://rubyurl.com/SSM

I checked that URL, I do not see what EOS stands for and how it is
used.
D4f5ba376e2d4e280889ed462939f632?d=identicon&s=25 anon1m0us (Guest)
on 2007-02-07 19:26
(Received via mailing list)
On Feb 7, 12:03 pm, "Gavin Kistner" <gavin.kist...@anark.com> wrote:
> From: anon1m0us [mailto:anon1m...@yahoo.com]
>
> > WHat is sharelist = <<EOS ????
>
> See:http://rubyurl.com/SSM

Ahh, sorry, I was looking for EOS, not "Strings can continue across
multiple input lines". How would this work if i use srvcheck on
multiple servers that can be stored in an array?
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (Guest)
on 2007-02-07 21:13
(Received via mailing list)
On Thu, Feb 08, 2007 at 03:25:05AM +0900, anon1m0us wrote:
> On Feb 7, 12:03 pm, "Gavin Kistner" <gavin.kist...@anark.com> wrote:
> > From: anon1m0us [mailto:anon1m...@yahoo.com]
> >
> > > WHat is sharelist = <<EOS ????
> >
> > See:http://rubyurl.com/SSM
>
> Ahh, sorry, I was looking for EOS, not "Strings can continue across
> multiple input lines". How would this work if i use srvcheck on
> multiple servers that can be stored in an array?

This syntax, called a "here-document", was just a short-cut way for me
to
include a test dataset directly in the program, instead of reading it in
from
a file.

string = <<FOOBAR
This is a long
multi-line string
FOOBAR

If you run srvcheck across multiple servers, you should just be able to
concatenate all the strings together. The last code example I posted
(with
the regexp scan) didn't use an array at all.

HTH,

Brian.
This topic is locked and can not be replied to.