tucker-altiscale / pdsh

Automatically exported from code.google.com/p/pdsh
GNU General Public License v2.0
0 stars 0 forks source link

dshbak no longer shows commas for collapsed hosts with same output if hostnames are dissimilar #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
``dshbak`` broke a bit somewhere between 2.11 and r1325,

same output for multiple hosts gets correctly collapsed
into ranges, but hostnames that don't fit in the ranges
just get mashed together::

    host1other4foo[8-20]

where it used to be::

    host1,other2,foo[8-20]

tried to understand the perl and got scared, but closed my
eyes and made the attached patch.

Please apply, thanks.

P.S. output used to be indented but it's not anymore, not
     sure that matters? cannot decide which looks better.

-- 
Scott

Original issue reported on code.google.com by scott@omnisys.com on 28 Apr 2011 at 10:19

Attachments:

GoogleCodeExporter commented 8 years ago
This was also reported in issue 19, and should have been fixed by r1319.

However, I like your fix better, for some reason I was determined to use the
obscure $" variable to join the hostlist with commas.

Can you check to make sure you have the dshbak from trunk, and see if you
still have the issue? I think there is even a test in the testsuite for this.

(Anyhow, I may still change the code to use your more straightforward join())

Original comment by mark.gro...@gmail.com on 28 Apr 2011 at 1:33

GoogleCodeExporter commented 8 years ago

Original comment by mark.gro...@gmail.com on 28 Apr 2011 at 1:38

GoogleCodeExporter commented 8 years ago
I had r1325 at the time, but was running perl 5.8.8,
don't know if that matters.

Current trunk seems to work fine for this.  Thanks!

Original comment by scott@omnisys.com on 2 May 2011 at 10:24